NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
DBG=-g breaks building netbsd-7 amd64, i386
Following the most recent round of pull-ups to the "netbsd-7" branch,
I began experiencing build failures in:
usr.sbin/npf/npftest/libnpftest/npf_table_test.c
[...]
# compile libnpftest/npf_table_test.o
/d0/build/netbsd-7/tools/amd64/bin/x86_64--netbsd-gcc -g -ffreestanding -fno-strict-aliasing -mno-red-zone -mno-mmx -mno-sse -mno-avx -msoft-float -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -Wno-sign-compare -Wold-style-definition -Wsign-compare -Wformat=2 -Wno-format-zero-length -Werror -Wno-format-zero-length -Wno-pointer-sign -g -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -D_NPF_TESTING -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/net/npf -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/librump/rumpkern --sysroot=/d0/build/netbsd-7/DEST/amd64 -D_RUMP_NATIVE_ABI -DMAXUSERS=32 -DCOMPAT_50=1 -DCOMPAT_60=1 -nostdinc -D_KERNEL -DMULTIPROCESSOR -D_MODULE -DMODULAR -DDEBUGPRINT -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest -I. -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/../../common/include -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/include -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/librump/rumpkern/opt -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/../arch -I/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/../../../../sys/rump/.. -DDIAGNOSTIC -DKTRACE -D__NetBSD__ -D_FORTIFY_SOURCE=2 -c /d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c -o npf_table_test.o
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:28:6: error: initializer element is not constant
htons(0xfe80), 0x0, 0x0, 0x0,
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:28:6: error: (near initialization for 'ip6_list[0][0]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: initializer element is not constant
htons(0x2a0), htons(0xc0ff), htons(0xfe10), htons(0x1234)
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: (near initialization for 'ip6_list[0][4]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: initializer element is not constant
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: (near initialization for 'ip6_list[0][5]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: initializer element is not constant
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:29:6: error: (near initialization for 'ip6_list[0][6]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:30:2: error: initializer element is not constant
},
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:30:2: error: (near initialization for 'ip6_list[0][7]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:32:6: error: initializer element is not constant
htons(0xfe80), 0x0, 0x0, 0x0,
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:32:6: error: (near initialization for 'ip6_list[1][0]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:33:6: error: initializer element is not constant
htons(0x2a0), htons(0xc0ff), 0x00, 0x0
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:33:6: error: (near initialization for 'ip6_list[1][4]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:33:6: error: initializer element is not constant
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:33:6: error: (near initialization for 'ip6_list[1][5]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:36:6: error: initializer element is not constant
htons(0xfe80), 0x0, 0x0, 0x0,
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:36:6: error: (near initialization for 'ip6_list[2][0]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:40:6: error: initializer element is not constant
htons(0xfe80), 0x0, 0x0, 0x0,
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:40:6: error: (near initialization for 'ip6_list[3][0]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: initializer element is not constant
htons(0x2a0), htons(0xc0ff), htons(0xfe10), htons(0x1230)
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: (near initialization for 'ip6_list[3][4]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: initializer element is not constant
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: (near initialization for 'ip6_list[3][5]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: initializer element is not constant
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:41:6: error: (near initialization for 'ip6_list[3][6]')
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:42:2: error: initializer element is not constant
}
^
/d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest/npf_table_test.c:42:2: error: (near initialization for 'ip6_list[3][7]')
*** [npf_table_test.o] Error code 1
nbmake[9]: stopped in /d0/nbsd/netbsd-7/src/usr.sbin/npf/npftest/libnpftest
1 error
[...]
The curious thing was that it only affected amd64 and i386 builds, but
not sparc. Then I noticed that it was only my local tree that exhibited
the problem, but not three other systems with their own independent source
trees for netbsd-7.
It turns out to be from my use of "DBG=-g" (in conjunction with MKDEBUG=yes
and MKDEBUG_LIB=yes). I had conditionalized "DBG=-g" for i386/amd64 only
since it caused build failures on other architectures. I'd really only
meant to use it when building -current but since I've just been using the
stock "/etc/mk.conf", it was being used for all builds.
The three other independent systems were not using "DBG=-g".
I'm in the process of revising my build arrangements to use
"MAKECONF=/path/to/specific/mk.conf" for each of my active source trees.
--
|/"\ John D. Baker, KN5UKS NetBSD Darwin/MacOS X
|\ / jdbaker[snail]mylinuxisp[flyspeck]com OpenBSD FreeBSD
| X No HTML/proprietary data in email. BSD just sits there and works!
|/ \ GPGkeyID: D703 4A7E 479F 63F8 D3F4 BD99 9572 8F23 E4AD 1645
Home |
Main Index |
Thread Index |
Old Index