From 15027d6de049fa139a193abc5a86e6578faf630d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 15 Apr 2014 21:59:42 -0500 Subject: Probes for O_NOFOLLOW that compile and run something aren't compatible with cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says. --- scripts/genconfig.sh | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'scripts/genconfig.sh') diff --git a/scripts/genconfig.sh b/scripts/genconfig.sh index 71bc609a..8ab26dcc 100755 --- a/scripts/genconfig.sh +++ b/scripts/genconfig.sh @@ -49,33 +49,5 @@ genconfig() done } -headerprobes() -{ - ${CROSS_COMPILE}${CC} $CFLAGS -xc -o /dev/null - 2>/dev/null << EOF - #include - #ifndef O_NOFOLLOW - #error posix 2008 was a while ago now - #endif -EOF - if [ $? -ne 0 ] - then - rm -f a.out - ${CROSS_COMPILE}${CC} $CFLAGS -xc - 2>/dev/null << EOF - #include - #include - #include - - int main(int argc, char *argv[]) - { - printf("0x%x\n", O_NOFOLLOW); - } -EOF - X=$(./a.out) 2>/dev/null - rm -f a.out - echo "#define O_NOFOLLOW ${X:-0}" - fi -} - probeconfig > generated/Config.probed || rm generated/Config.probed genconfig > generated/Config.in || rm generated/Config.in -headerprobes > generated/portability.h || rm generated/portability.h -- cgit v1.2.3