-Os breaks buildworld

Dimitry Andric dim at FreeBSD.org
Tue Apr 9 21:11:15 UTC 2013


On Apr 9, 2013, at 14:50, Christian Baer <christian.baer at uni-dortmund.de> wrote:
...
> CPUTYPE= athlon-xp
> CFLAGS= -O2 -fno-strict-aliasing -pipe -mtune=athlon-xp -march=athlon-xp

As mentioned in this thread:
- CPUTYPE should be set with ?=, not =
- CFLAGS should be set with +=, not =
- Do not explicitly add -march or -mtune, use CPUTYPE exclusively
- If you want -Os optimization, do not put -O2 in CFLAGS


...
> cc -Os -fno-strict-aliasing -pipe -mtune=athlon-xp -march=athlon-xp
> -march=athlon-xp -DPTHREAD_KERNEL -I/usr/src/lib/libthr/../libc/include
> -I/usr/src/lib/libthr/thread  -I/usr/src/lib/libthr/../../include
> -I/usr/src/lib/libthr/arch/i386/include -I/usr/src/lib/libthr/sys
> -I/usr/src/lib/libthr/../../libexec/rtld-elf
> -I/usr/src/lib/libthr/../../libexec/rtld-elf/i386
> -I/usr/src/lib/libthr/../libthread_db -Winline -D_PTHREADS_INVARIANTS
> -DSYSCALL_COMPAT -std=gnu99 -Wsystem-headers -Werror -Wall
> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign
> -c /usr/src/lib/libthr/sys/thr_error.c cc -Os -fno-strict-aliasing -pipe
> -mtune=athlon-xp -march=athlon-xp -march=athlon-xp -DPTHREAD_KERNEL
> -I/usr/src/lib/libthr/../libc/include -I/usr/src/lib/libthr/thread 
> -I/usr/src/lib/libthr/../../include
> -I/usr/src/lib/libthr/arch/i386/include -I/usr/src/lib/libthr/sys
> -I/usr/src/lib/libthr/../../libexec/rtld-elf
> -I/usr/src/lib/libthr/../../libexec/rtld-elf/i386
> -I/usr/src/lib/libthr/../libthread_db -Winline -D_PTHREADS_INVARIANTS
> -DSYSCALL_COMPAT -std=gnu99 -Wsystem-headers -Werror -Wall
> -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes
> -Wmissing-prototypes -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign
> -c /usr/src/lib/libthr/thread/thr_affinity.c
> cc1: warnings being treated as errors
> /usr/src/lib/libthr/thread/thr_affinity.c: In function
> '_pthread_setaffinity_np': /usr/src/lib/libthr/thread/thr_umtx.h:103:
> warning: inlining failed in call to '_thr_umutex_unlock': --param
> max-inline-insns-single limit reached
> /usr/src/lib/libthr/thread/thr_affinity.c:56: warning: called from here
> /usr/src/lib/libthr/thread/thr_umtx.h:103: warning: inlining failed in
> call to '_thr_umutex_unlock': --param max-inline-insns-single limit
> reached /usr/src/lib/libthr/thread/thr_affinity.c:64: warning: called
> from here *** Error code 1

Try building with NO_WERROR= in make.conf or src.conf.  In this case,
gcc is warning that it cannot inline some function, but that should not
matter for the result.



More information about the freebsd-stable mailing list