From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 9 12:00:30 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DE3E37B401 for ; Mon, 9 Jun 2003 12:00:30 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 821D243FBD for ; Mon, 9 Jun 2003 12:00:29 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h59J0SUp059606 for ; Mon, 9 Jun 2003 12:00:28 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h59J0SA1059605; Mon, 9 Jun 2003 12:00:28 -0700 (PDT) Date: Mon, 9 Jun 2003 12:00:28 -0700 (PDT) Message-Id: <200306091900.h59J0SA1059605@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Artem 'Zazoobr' Ignatjev" Subject: Re: kern/52764: Impossible to build kernel with COPTFLAGS=-O0 and without INET6 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Artem 'Zazoobr' Ignatjev List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jun 2003 19:00:30 -0000 The following reply was made to PR kern/52764; it has been noted by GNATS. From: "Artem 'Zazoobr' Ignatjev" To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: kern/52764: Impossible to build kernel with COPTFLAGS=-O0 and without INET6 Date: 09 Jun 2003 22:57:45 +0400 --=-HpuLBCbRsckjuxTS3YTY Content-Type: text/plain Content-Transfer-Encoding: 7bit Yar Tikhiy wrote: > >Synopsis: Impossible to build kernel with COPTFLAGS=-O0 and without INET6 > >Description: > It appears that the FreeBSD kernel will have unresolved > references to INET6 functions if its files are compiled > with "-O0", but without INET6. > > The root of the problem is in tcp_input.c. There are places > in that file where a C if() operator is used as though it > were #if. That is, the condition in the operator will be > a compile-time constant depending on whether INET6 is > defined. In all optimization cases but "-O0", gcc(1) will > just ignore the code since it appears inside dead "if (0) {}" > blocks if INET6 is undefined. But with "-O0", gcc(1) will > include the code into the object file; and the linker will > consequently fail to link the kernel. > > >How-To-Repeat: > Add "makeoptions COPTFLAGS=-O0" to a kernel configuration file > and make sure there is no "options INET6" in it. Try to build > such a kernel. Yesterday I've cvsupped to RELENG_5, and I'm confirming the bug is still there. Below are my kernel config and make.conf --=-HpuLBCbRsckjuxTS3YTY Content-Disposition: inline; filename=TIMON Content-Type: text/plain; name=TIMON; charset=KOI8-R Content-Transfer-Encoding: 7bit # # GENERIC -- Generic kernel configuration file for FreeBSD/i386 # # For more information on this file, please read the handbook section on # Kernel Configuration Files: # # http://www.FreeBSD.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig-config.html # # The handbook is also available locally in /usr/share/doc/handbook # if you've installed the doc distribution, otherwise always see the # FreeBSD World Wide Web server (http://www.FreeBSD.org/) for the # latest information. # # An exhaustive list of options and more detailed explanations of the # device lines is also present in the ../../conf/NOTES and NOTES files. # If you are in doubt as to the purpose or necessity of a line, check first # in NOTES. # # $FreeBSD: src/sys/i386/conf/GENERIC,v 1.369 2002/10/19 16:54:07 rwatson Exp $ machine i386 cpu I586_CPU cpu I686_CPU ident TIMON maxusers 0 #To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" #Default places to look for devices. #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols options INET #InterNETworking options FFS #Berkeley Fast Filesystem options SOFTUPDATES #Enable FFS soft updates support options UFS_ACL #Support for access control lists options UFS_DIRHASH #Improve performance on big directories options NFSCLIENT #Network Filesystem Client options NFSSERVER #Network Filesystem Server options MSDOSFS #MSDOS Filesystem options CD9660 #ISO 9660 Filesystem options PROCFS #Process filesystem (requires PSEUDOFS) options PSEUDOFS #Pseudo-filesystem framework options COMPAT_43 #Compatible with BSD 4.3 [KEEP THIS!] options COMPAT_FREEBSD4 #Compatible with FreeBSD4 options SCSI_DELAY=15000 #Delay (in ms) before probing SCSI options KTRACE #ktrace(1) support options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev #options SCHED_ULE options SCHED_4BSD # Debugging for use in -current #options DDB #Enable the kernel debugger #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed device isa device pci # Floppy drives device fdc # ATA and ATAPI devices device ata device atadisk # ATA disk drives device atapicd # ATAPI CDROM drives options ATA_STATIC_ID #Static device numbering # SCSI peripherals device scbus # SCSI bus (required) device da # Direct Access (disks) device pass # Passthrough device (direct SCSI access) #device ses # SCSI Environmental Services (and SAF-TE) device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc #device agp # support several AGP chipsets # Floating point support - do not disable. device npx # Power management support (see NOTES for more options) device apm # Add suspend/resume support for the i8254. device pmtimer # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports # Parallel port #device ppc #device ppbus # Parallel port bus (required) #device lpt # Printer #device plip # TCP/IP over parallel #device ppi # Parallel port interface device #device vpo # Requires scbus and da device miibus # MII bus support device fxp # Intel EtherExpress PRO/100B (82557, 82558) device rl # RealTek 8129/8139 # Pseudo devices - the number indicates how many units to allocate. device random # Entropy device device loop # Network loopback device ether # Ethernet support device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! device bpf # Berkeley packet filter # USB support device uhci # UHCI PCI->USB interface device ohci # OHCI PCI->USB interface device usb # USB Bus (required) device udbp # USB Double Bulk Pipe devices device ugen # Generic #device uhid # "Human Interface Devices" #device ukbd # Keyboard #device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse device pcm device midi device seq options NETGRAPH options NETSMB options NETSMBCRYPTO options LIBMCHAIN options LIBICONV options SMBFS options FB_INSTALL_CDEV options NTFS options EXT2FS options SC_PIXEL_MODE options SC_MOUSE_CHAR="0x03" options VESA options UFS_EXTATTR options UFS_EXTATTR_AUTOSTART device smbus device iicbb device iicbus device bktr options NETGRAPH options NETGRAPH_BPF options NETGRAPH_ECHO options NETGRAPH_ETHER options NETGRAPH_GIF options NETGRAPH_GIF_DEMUX options NETGRAPH_HOLE options NETGRAPH_IFACE options NETGRAPH_IP_INPUT options NETGRAPH_KSOCKET options NETGRAPH_L2TP options NETGRAPH_LMI options NETGRAPH_MPPC_ENCRYPTION options NETGRAPH_ONE2MANY options NETGRAPH_PPP options NETGRAPH_PPPOE options NETGRAPH_PPTPGRE options NETGRAPH_RFC1490 options NETGRAPH_SOCKET options NETGRAPH_SPLIT options NETGRAPH_TEE options GEOM_BSD options GEOM_MBR #options GEOM_SUNLABEL #options GEOM_SUNLABEL_X86 device ichsmb device acpi device ic device iic device iicsmb --=-HpuLBCbRsckjuxTS3YTY Content-Disposition: inline; filename=make.conf Content-Type: text/plain; name=make.conf; charset=KOI8-R Content-Transfer-Encoding: 7bit CPUTYPE=i686 MASTER_SITES_OVERRIDE=ftp://ftp.gamma.ru/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ ftp://ftp.chg.ru/pub/FreeBSD/ports/distfiles/${DIST_SUBDIR}/ FETCH_CMD="/usr/local/bin/portfetch" NO_FORTRAN= true NO_I4B= true NO_IPFILTER= true NO_PERL= true NOUUCP= true MAKE_KERBEROS4= false MAKE_KERBEROS5= false #NO_CPU_CFLAGS=true #NO_CPU_COPTFLAGS=true COPTFLAGS= NO_KERBEROS5=true #NO_SHAREDOCS= true # do not build the 4.4BSD legacy docs # -- use.perl generated deltas -- # # Created: Mon May 19 21:12:51 2003 # Setting to use base perl from ports: PERL_VER=5.6.1 PERL_VERSION=5.6.1 PERL_ARCH=mach NOPERL=yo NO_PERL=yo NO_PERL_WRAPPER=yo KERNCONF=TIMON --=-HpuLBCbRsckjuxTS3YTY--