Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-02-12 09:59:13 +0300
committerMike Frysinger <vapier@gentoo.org>2022-02-17 04:29:08 +0300
commite0c0ad8268af60a2413edcab84320eef1e6ce5f9 (patch)
treea2a4500e032c15999570484ffc923a4c31aca437 /libgloss/configure
parent5ca1f8c7ff79f9b9d139de379af2edc25f38ee01 (diff)
libgloss: build with -nostdinc
We don't want libgloss building against C library headers that happened to be installed with the toolchain, so add -nostdinc to the build. We still need access to the compiler internal headers, so probe those and include them via -isystem. This uses a similar probing style as glibc, which has used it for over a decade, so it should be safe & stable. This should prevent any latent bugs due to testing with a toolchain that is fully configured & installed already.
Diffstat (limited to 'libgloss/configure')
-rwxr-xr-xlibgloss/configure20
1 files changed, 20 insertions, 0 deletions
diff --git a/libgloss/configure b/libgloss/configure
index abe3a574c..215a5c7a5 100755
--- a/libgloss/configure
+++ b/libgloss/configure
@@ -5104,6 +5104,26 @@ esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler search settings" >&5
+$as_echo_n "checking for compiler search settings... " >&6; }
+if ${libc_cv_compiler_isystem+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ for subdir in include include-fixed; do
+ if dir=`$CC -print-file-name=$subdir`; then :
+ if test -n "$dir"; then :
+ libc_cv_compiler_isystem="$libc_cv_compiler_isystem -isystem $dir"
+
+fi
+
+fi
+ done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_compiler_isystem" >&5
+$as_echo "$libc_cv_compiler_isystem" >&6; }
+CC="$CC -nostdinc $libc_cv_compiler_isystem"
+
host_makefile_frag_path=$host_makefile_frag