aboutsummaryrefslogtreecommitdiff
path: root/newlib/Makefile.am
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2023-02-09 16:59:31 -0500
committerJeff Johnston <jjohnstn@redhat.com>2023-02-22 14:53:05 -0500
commit17ac400c11bab30ac2c0bef12cbf7788f0b6f954 (patch)
treef64b33a564048dd2831f77501b2f0c266e9eff84 /newlib/Makefile.am
parent97d483c2f81c0865bead701f4d2824a21fae4938 (diff)
downloadnewlib-17ac400c11bab30ac2c0bef12cbf7788f0b6f954.zip
newlib-17ac400c11bab30ac2c0bef12cbf7788f0b6f954.tar.gz
newlib-17ac400c11bab30ac2c0bef12cbf7788f0b6f954.tar.bz2
Fix libgloss/newlib build to conditionally use top include dir
- conditionally use -idirafter option for arm
Diffstat (limited to 'newlib/Makefile.am')
-rw-r--r--newlib/Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/Makefile.am b/newlib/Makefile.am
index 3bebf27..a188845 100644
--- a/newlib/Makefile.am
+++ b/newlib/Makefile.am
@@ -70,7 +70,11 @@ toollibdir = $(tooldir)/lib$(MULTISUBDIR)
# These are useful for standalone object files like crt0.o.
AM_CFLAGS = $(AM_CFLAGS_$(subst /,_,$(@D))) $(AM_CFLAGS_$(subst /,_,$(@D)_$(<F)))
AM_CCASFLAGS = $(AM_CCASFLAGS_$(subst /,_,$(@D))) $(AM_CCASFLAGS_$(subst /,_,$(@D)_$(<F)))
+if HAVE_LIBC_MACHINE_ARM
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS) $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F))) -idirafter $(srcroot)/include
+else
+AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(TARGET_CFLAGS) $(AM_CPPFLAGS_$(subst /,_,$(@D))) $(AM_CPPFLAGS_$(subst /,_,$(@D)_$(<F)))
+endif
toollib_LIBRARIES = libm.a \
libc.a