From 0597fe0adc39d0d2c34f70cfc9bd47c35107ebe1 Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Wed, 12 Jan 2011 22:24:06 +0000 Subject: [PATCH] 2011-01-12 Jeff Johnston * configure.host: Add noinclude variable to allow specification of header files to remove from installation. * acinclude.m4: Provide NO_INCLUDE_LIST variable based on noinclude variable in configure.host. * configure: Regenerated. * Makefile.am: Remove all header files in NO_INCLUDE_LIST. * Makefile.in: Regenerated. --- newlib/ChangeLog | 10 ++++++++++ newlib/Makefile.am | 5 +++++ newlib/Makefile.in | 6 ++++++ newlib/acinclude.m4 | 3 +++ newlib/configure | 8 ++++++-- newlib/configure.host | 7 +++++++ 6 files changed, 37 insertions(+), 2 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 1c168a62e..8ace534c4 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,13 @@ +2011-01-12 Jeff Johnston + + * configure.host: Add noinclude variable to allow specification + of header files to remove from installation. + * acinclude.m4: Provide NO_INCLUDE_LIST variable based on + noinclude variable in configure.host. + * configure: Regenerated. + * Makefile.am: Remove all header files in NO_INCLUDE_LIST. + * Makefile.in: Regenerated. + 2011-01-12 Yaakov Selkowitz * libc/include/linux/sys/signal.h (sig_t): Move from here... diff --git a/newlib/Makefile.am b/newlib/Makefile.am index d7205b66b..dca626073 100644 --- a/newlib/Makefile.am +++ b/newlib/Makefile.am @@ -330,6 +330,11 @@ endif $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \ else true; fi ; \ done ; \ + for i in $(NO_INCLUDE_LIST); do \ + if [ -f $(DESTDIR)$(tooldir)/include/$$i]; then \ + -rm $(DESTDIR)$(tooldir)/include/$$i; \ + else true; fi ; \ + done ; \ else true; fi # Force makedoc to be built before building info files. diff --git a/newlib/Makefile.in b/newlib/Makefile.in index 22561157a..3d5d31223 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -198,6 +198,7 @@ MKDIR_P = @MKDIR_P@ NEWLIB_CFLAGS = @NEWLIB_CFLAGS@ NM = @NM@ NMEDIT = @NMEDIT@ +NO_INCLUDE_LIST = @NO_INCLUDE_LIST@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ @@ -1036,6 +1037,11 @@ install-data-local: install-toollibLIBRARIES $(INSTALL_DATA) $$i $(DESTDIR)$(tooldir)/include/machine/`basename $$i`; \ else true; fi ; \ done ; \ + for i in $(NO_INCLUDE_LIST); do \ + if [ -f $(DESTDIR)$(tooldir)/include/$$i]; then \ + -rm $(DESTDIR)$(tooldir)/include/$$i; \ + else true; fi ; \ + done ; \ else true; fi # Force makedoc to be built before building info files. diff --git a/newlib/acinclude.m4 b/newlib/acinclude.m4 index 2ac920b2c..8ec9b7fc5 100644 --- a/newlib/acinclude.m4 +++ b/newlib/acinclude.m4 @@ -205,6 +205,9 @@ newlib_cflags="[$]{newlib_cflags} -fno-builtin" NEWLIB_CFLAGS=${newlib_cflags} AC_SUBST(NEWLIB_CFLAGS) +NO_INCLUDE_LIST=${noinclude} +AC_SUBST(NO_INCLUDE_LIST) + LDFLAGS=${ldflags} AC_SUBST(LDFLAGS) diff --git a/newlib/configure b/newlib/configure index ff8c9bdec..35ffa07eb 100755 --- a/newlib/configure +++ b/newlib/configure @@ -672,6 +672,7 @@ ELIX_LEVEL_1_TRUE ELIX_LEVEL_0_FALSE ELIX_LEVEL_0_TRUE LDFLAGS +NO_INCLUDE_LIST NEWLIB_CFLAGS CCASFLAGS CCAS @@ -3838,6 +3839,9 @@ newlib_cflags="${newlib_cflags} -fno-builtin" NEWLIB_CFLAGS=${newlib_cflags} +NO_INCLUDE_LIST=${noinclude} + + LDFLAGS=${ldflags} @@ -11631,7 +11635,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11634 "configure" +#line 11638 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11737,7 +11741,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11740 "configure" +#line 11744 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/newlib/configure.host b/newlib/configure.host index 6e7e5b306..a71d6303f 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -46,6 +46,7 @@ # crt1_dir directory where crt1 object is found # have_crt0 "yes"/"no" if crt0 is/isn't provided. # "" if crt0 is provided when sys_dir is set +# noinclude list of include files to not install newlib_cflags= libm_machine_dir= @@ -58,6 +59,7 @@ stdio64_dir= xdr_dir= syscall_dir= unix_dir= +noinclude= mach_add_setjmp= crt1= crt1_dir= @@ -852,6 +854,11 @@ if [ "x${newlib_atexit_dynamic_alloc}" = "x" ]; then fi fi +# Remove rpc headers if xdr_dir not specified +if [ "x${xdir_dir}" = "x" ]; then + noinclude="${noinclude} rpc/types.h rpc/xdr.h" +fi + if test -z "${have_crt0}" && test -n "${sys_dir}"; then have_crt0="yes" fi