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.
This commit is contained in:
Mike Frysinger 2022-01-27 19:24:16 -05:00
parent 6444f108d9
commit fc0bd2eb03
28 changed files with 30 additions and 30 deletions

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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 =

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -332,7 +332,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -327,7 +327,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/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)

View File

@ -358,7 +358,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/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)
LIB_SOURCES = \
f_atan2.S f_atan2f.S f_exp.c f_expf.c \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -317,7 +317,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
if HAS_NDS32_FPU_SP_FALSE

View File

@ -325,7 +325,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
@HAS_NDS32_FPU_SP_FALSE@GPR_SOURCES =

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -317,7 +317,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -316,7 +316,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -332,7 +332,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -317,7 +317,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -374,7 +374,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -1,6 +1,6 @@
## Process this file with automake to generate Makefile.in
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \

View File

@ -330,7 +330,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AM_CPPFLAGS = -I $(newlib_basedir)/../newlib/libm/common $(NEWLIB_CFLAGS) \
AM_CPPFLAGS = -I $(abs_newlib_basedir)/libm/common $(NEWLIB_CFLAGS) \
$(CROSS_CFLAGS) $(TARGET_CFLAGS)
LIB_SOURCES = \