aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-27 19:24:16 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-29 01:35:30 -0500
commitfc0bd2eb039bfe83d4d6c0ec6507cc5f631edad7 (patch)
tree422d9ccfdd06fdb179b04fcf088f95b3e63e139f /newlib/libc
parent6444f108d9a4a6fac8462c116d4104889b5efb95 (diff)
downloadnewlib-fc0bd2eb039bfe83d4d6c0ec6507cc5f631edad7.zip
newlib-fc0bd2eb039bfe83d4d6c0ec6507cc5f631edad7.tar.gz
newlib-fc0bd2eb039bfe83d4d6c0ec6507cc5f631edad7.tar.bz2
newlib: use abs_newlib_basedir for -I paths
When we had configure scripts in subdirs, the newlib_basedir value was computed relative to that, and it'd be the same when used in the Makefile in the same dir. With many subdir configure scripts removed, the top-level configure & Makefile can't use the same relative path. So switch the subdir Makefiles over to abs_newlib_basedir when they use -I to find source headers. Do this for all subdirs, even ones with configure scripts and where newlib_basedir works. This makes the code consistent, and avoids surprises if the configure script is ever removed in the future as part of merging to the higher level. Some of the subdirs were using -I$(newlib_basedir)/../newlib/ for some reason. Collapse those too since newlib_basedir points to the newlib source tree already.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/machine/i386/Makefile.am2
-rw-r--r--newlib/libc/machine/i386/Makefile.in2
-rw-r--r--newlib/libc/machine/xstormy16/Makefile.am4
-rw-r--r--newlib/libc/machine/xstormy16/Makefile.in4
-rw-r--r--newlib/libc/sys/arm/Makefile.am2
-rw-r--r--newlib/libc/sys/arm/Makefile.in2
6 files changed, 8 insertions, 8 deletions
diff --git a/newlib/libc/machine/i386/Makefile.am b/newlib/libc/machine/i386/Makefile.am
index 8b851f5..311d1b9 100644
--- a/newlib/libc/machine/i386/Makefile.am
+++ b/newlib/libc/machine/i386/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
-AM_CPPFLAGS = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(AM_CPPFLAGS)
diff --git a/newlib/libc/machine/i386/Makefile.in b/newlib/libc/machine/i386/Makefile.in
index 73159fa..f410525 100644
--- a/newlib/libc/machine/i386/Makefile.in
+++ b/newlib/libc/machine/i386/Makefile.in
@@ -359,7 +359,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(AM_CPPFLAGS)
@MACH_ADD_SETJMP_FALSE@ADDED_SOURCES =
@MACH_ADD_SETJMP_TRUE@ADDED_SOURCES = setjmp.S
diff --git a/newlib/libc/machine/xstormy16/Makefile.am b/newlib/libc/machine/xstormy16/Makefile.am
index b0b72bc..c20b01c 100644
--- a/newlib/libc/machine/xstormy16/Makefile.am
+++ b/newlib/libc/machine/xstormy16/Makefile.am
@@ -1,8 +1,8 @@
## Process this file with automake to generate Makefile.in
-# hack: putting $(newlib_basedir)/libm/common into AM_CPPFLAGS forces automake
+# hack: putting $(abs_newlib_basedir)/libm/common into AM_CPPFLAGS forces automake
# to output a definition for newlib_basedir.
-AM_CPPFLAGS = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(AM_CPPFLAGS)
diff --git a/newlib/libc/machine/xstormy16/Makefile.in b/newlib/libc/machine/xstormy16/Makefile.in
index cad66f1..fbecb41 100644
--- a/newlib/libc/machine/xstormy16/Makefile.in
+++ b/newlib/libc/machine/xstormy16/Makefile.in
@@ -338,9 +338,9 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-# hack: putting $(newlib_basedir)/libm/common into AM_CPPFLAGS forces automake
+# hack: putting $(abs_newlib_basedir)/libm/common into AM_CPPFLAGS forces automake
# to output a definition for newlib_basedir.
-AM_CPPFLAGS = -I $(newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
+AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
lib_a_SOURCES = setjmp.S
diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am
index b88c30c..dda6ffb 100644
--- a/newlib/libc/sys/arm/Makefile.am
+++ b/newlib/libc/sys/arm/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(newlib_basedir)/libc/machine/arm
+AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(abs_newlib_basedir)/libc/machine/arm
AM_CCASFLAGS = $(AM_CPPFLAGS)
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
index b3d2072..e7e7581 100644
--- a/newlib/libc/sys/arm/Makefile.in
+++ b/newlib/libc/sys/arm/Makefile.in
@@ -339,7 +339,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(newlib_basedir)/libc/machine/arm
+AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(abs_newlib_basedir)/libc/machine/arm
AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =