Re: [PATCH] Check sysheaders when looking for Mach and Hurd headers
Hello, Manolis Ragkousis, le Fri 04 Sep 2015 10:38:22 +0300, a écrit : > With this patch, glibc's configure takes into account the > "--with-headers" argument > when checking for Mach and Hurd header. I have pushed it, thanks! Samuel
Re: [PATCH] Check sysheaders when looking for Mach and Hurd headers
That looks OK to me.
[PATCH] Check sysheaders when looking for Mach and Hurd headers
Hello everyone, With this patch, glibc's configure takes into account the "--with-headers" argument when checking for Mach and Hurd header. This patch applies on glibc master. From 163cac91f3e5d8e200cf2ddd4a44fe582b989f48 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis <manolis...@gmail.com> Date: Wed, 26 Aug 2015 23:48:33 +0200 Subject: [PATCH] Check sysheaders when looking for Mach and Hurd headers * sysdeps/mach/configure.ac: Add sysheaders check. * sysdeps/mach/configure: Regenerate. * sysdeps/mach/hurd/configure.ac: Add sysheaders check. * sysdeps/mach/hurd/configure: Regenerate. --- sysdeps/mach/configure | 9 + sysdeps/mach/configure.ac | 9 + sysdeps/mach/hurd/configure| 9 + sysdeps/mach/hurd/configure.ac | 9 + 4 files changed, 36 insertions(+) diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index 228f99e..4d2a4e3 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -165,6 +165,11 @@ fi config_vars="$config_vars MIG = $MIG" +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi + ### Sanity checks for Mach header installation @@ -553,3 +558,7 @@ if test $hurd_cv_mig_retcode = yes; then $as_echo "#define HAVE_MIG_RETCODE 1" >>confdefs.h fi + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac index db85f47..00b660c 100644 --- a/sysdeps/mach/configure.ac +++ b/sysdeps/mach/configure.ac @@ -6,6 +6,11 @@ if test "x$MIG" = xMISSING; then fi LIBC_CONFIG_VAR([MIG], [$MIG]) +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi + ### Sanity checks for Mach header installation AC_CHECK_HEADER(mach/mach_types.h,, [AC_MSG_ERROR([cannot find Mach headers])], -) @@ -124,3 +129,7 @@ if test $hurd_cv_mig_retcode = yes; then fi]) hurd_MIG_RETCODE + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure index 4248758..3d155a4 100644 --- a/sysdeps/mach/hurd/configure +++ b/sysdeps/mach/hurd/configure @@ -3,6 +3,11 @@ $as_echo "#define NO_HIDDEN 1" >>confdefs.h +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Hurd header version" >&5 $as_echo_n "checking Hurd header version... " >&6; } @@ -36,3 +41,7 @@ $as_echo "$libc_cv_hurd_version" >&6; } if test "x$libc_cv_hurd_version" != xok; then as_fn_error $? "Hurd headers not installed or too old" "$LINENO" 5 fi + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac index b1f16a5..af9a9ea 100644 --- a/sysdeps/mach/hurd/configure.ac +++ b/sysdeps/mach/hurd/configure.ac @@ -3,6 +3,11 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. dnl We need this setting because of the need for PLT calls in ld.so. AC_DEFINE([NO_HIDDEN]) +if test -n "$sysheaders"; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $SYSINCLUDES" +fi + AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl AC_TRY_COMPILE(dnl [#include ], [ @@ -15,3 +20,7 @@ AC_TRY_COMPILE(dnl if test "x$libc_cv_hurd_version" != xok; then AC_MSG_ERROR(Hurd headers not installed or too old) fi + +if test -n "$sysheaders"; then + CPPFLAGS=$OLD_CPPFLAGS +fi -- 2.5.1
Re: [PATCH] Check sysheaders when looking for Mach and Hurd headers.
Hello, Manolis Ragkousis, le Fri 14 Aug 2015 14:42:46 +0300, a écrit : With this patch, glibc's configure, when checking for Mach and Hurd headers, takes into account the --with-headers argument. Thanks! (we need it for the Debian bootstrap too, indeed :) I am not sending this to libc-alpha because I noticed there are some differences in the files I am patching and the patch won't apply there. I will send to libc-alpha an updated patch that applies to their tree. Please do, the patch looks completely sane (and is actually what other configure.ac files do). Samuel
Re: [PATCH] Check sysheaders when looking for Mach and Hurd headers.
On 27 August 2015 at 00:44, Samuel Thibault samuel.thiba...@gnu.org wrote: Please do, the patch looks completely sane (and is actually what other configure.ac files do). Will do :)
[PATCH] Check sysheaders when looking for Mach and Hurd headers.
Hello everyone, With this patch, glibc's configure, when checking for Mach and Hurd headers, takes into account the --with-headers argument. I am not sending this to libc-alpha because I noticed there are some differences in the files I am patching and the patch won't apply there. I will send to libc-alpha an updated patch that applies to their tree. From 39b09d8cb8ee3b3ca0ca9fcd772df3fab41c02f8 Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis manolis...@gmail.com Date: Fri, 14 Aug 2015 01:20:59 +0300 Subject: [PATCH] Check sysheaders when looking for Mach and Hurd headers. * sysdeps/mach/configure.ac: Add sysheaders check. * sysdeps/mach/configure: Regenerate. * sysdeps/mach/hurd/configure.ac: Add sysheaders check. * sysdeps/mach/hurd/configure: Regenerate. --- sysdeps/mach/configure | 9 + sysdeps/mach/configure.ac | 9 + sysdeps/mach/hurd/configure| 9 + sysdeps/mach/hurd/configure.ac | 9 + 4 files changed, 36 insertions(+) diff --git a/sysdeps/mach/configure b/sysdeps/mach/configure index 290a5ff..d7c102c 100644 --- a/sysdeps/mach/configure +++ b/sysdeps/mach/configure @@ -165,6 +165,11 @@ fi config_vars=$config_vars MIG = $MIG +if test -n $sysheaders; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$CPPFLAGS $SYSINCLUDES +fi + ### Sanity checks for Mach header installation @@ -553,3 +558,7 @@ if test $hurd_cv_mig_retcode = yes; then $as_echo #define HAVE_MIG_RETCODE 1 confdefs.h fi + +if test -n $sysheaders; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/configure.ac b/sysdeps/mach/configure.ac index 52d47e0..f972270 100644 --- a/sysdeps/mach/configure.ac +++ b/sysdeps/mach/configure.ac @@ -6,6 +6,11 @@ if test x$MIG = xMISSING; then fi LIBC_CONFIG_VAR([MIG], [$MIG]) +if test -n $sysheaders; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$CPPFLAGS $SYSINCLUDES +fi + ### Sanity checks for Mach header installation AC_CHECK_HEADER(mach/mach_types.h,, [AC_MSG_ERROR([cannot find Mach headers])], -) @@ -124,3 +129,7 @@ if test $hurd_cv_mig_retcode = yes; then fi]) hurd_MIG_RETCODE + +if test -n $sysheaders; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure index a0f9721..4b2ad37 100644 --- a/sysdeps/mach/hurd/configure +++ b/sysdeps/mach/hurd/configure @@ -17,6 +17,11 @@ case $machine in ;; esac +if test -n $sysheaders; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$CPPFLAGS $SYSINCLUDES +fi + { $as_echo $as_me:${as_lineno-$LINENO}: checking Hurd header version 5 $as_echo_n checking Hurd header version... 6; } @@ -50,3 +55,7 @@ $as_echo $libc_cv_hurd_version 6; } if test x$libc_cv_hurd_version != xok; then as_fn_error $? Hurd headers not installed or too old $LINENO 5 fi + +if test -n $sysheaders; then + CPPFLAGS=$OLD_CPPFLAGS +fi diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac index ad915a5..db783a0 100644 --- a/sysdeps/mach/hurd/configure.ac +++ b/sysdeps/mach/hurd/configure.ac @@ -17,6 +17,11 @@ case $machine in ;; esac +if test -n $sysheaders; then + OLD_CPPFLAGS=$CPPFLAGS + CPPFLAGS=$CPPFLAGS $SYSINCLUDES +fi + AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl AC_TRY_COMPILE(dnl [#include hurd/version.h], [ @@ -29,3 +34,7 @@ AC_TRY_COMPILE(dnl if test x$libc_cv_hurd_version != xok; then AC_MSG_ERROR(Hurd headers not installed or too old) fi + +if test -n $sysheaders; then + CPPFLAGS=$OLD_CPPFLAGS +fi -- 2.5.0