[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
False negative in -c and -o check
From: |
Ola x Nilsson |
Subject: |
False negative in -c and -o check |
Date: |
Tue, 17 May 2016 12:26:13 +0200 |
When building ncurses with the Yocto Krogoth release I encountered the
following situation:
* The CC variable is set to 'arm-poky-linux-gnueabi-gcc -march=armv7-a
-mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -D__ARM__
--sysroot=.../yocto/cvp-krogoth/builds/board/tmp/sysroots/board'
* This triggers the 'checking the $CC variable' test cleanup code
(CF_ADD_CFLAGS ?) and sets CC to plain 'arm-poky-linux-gnueabi-gcc'.
* The 'checking whether $CC understands -c and -o together' test
fails.
* The build fails because gcc cannot find init_keytry.h when building
init_keytry.c, probably due to extra 'cd obj_s' in the commandline.
The '-c and -o' test fails because it cannot find the stdio.h header,
not because the -o and -c options are not allowed together. The
reason for the failure is that arm-poky-linux-gnueabi-gcc is
configured to require the --sysroot argument, and the default sysroot
is invalid.
Now, you can debate whether this is a sane configuration of
arm-poky-linux-gnueabi-gcc and CC, but there is no question that the
'-c and -o' test may fail due to unrelated factors.
Also the fallback for compilers that does not support both -c and -o
seems to be broken.
Removing the -D__ARM__ option provided a workaround for me, as the
'checking the $CC variable' test only checks for -I, -D, and -U
flags.
The version of ncurses used was 6.0+20160213 downloaded from
git://anonscm.debian.org/collab-maint/ncurses.git, but as far as I can
see the error should be reproducible with the sources in
ftp://ftp.gnu.org/gnu/ncurses/ncurses-6.0.tar.gz .
--
Ola x Nilsson
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- False negative in -c and -o check,
Ola x Nilsson <=