aboutsummaryrefslogtreecommitdiff
path: root/winsup/Makefile.common
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2000-10-23 04:50:32 +0000
committerChristopher Faylor <me@cgf.cx>2000-10-23 04:50:32 +0000
commitbe69ad802b2dd38984d94756aeb639ca6614a3b1 (patch)
tree360cd816540d6ee368f01bb4658936b92ecc1247 /winsup/Makefile.common
parentad30b4ffcaded89b97dd812b810f73386ce6e034 (diff)
downloadnewlib-be69ad802b2dd38984d94756aeb639ca6614a3b1.zip
newlib-be69ad802b2dd38984d94756aeb639ca6614a3b1.tar.gz
newlib-be69ad802b2dd38984d94756aeb639ca6614a3b1.tar.bz2
* Makefile.common (LIBGCC): Acommodate older gcc's that don't need libstdc++.a.
Diffstat (limited to 'winsup/Makefile.common')
-rw-r--r--winsup/Makefile.common10
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/Makefile.common b/winsup/Makefile.common
index 86ac71f..629c1e5 100644
--- a/winsup/Makefile.common
+++ b/winsup/Makefile.common
@@ -85,8 +85,14 @@ c=-E
o=.E
endif
-LIBGCC:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name; exec $(CC_FOR_TARGET) -print-file-name=libstdc++.a}}
-GCC_INCLUDE:=${dir ${word 1,$(LIBGCC)}}/include
+libstdcxx:=${subst \,/,${shell $(CC_FOR_TARGET) -print-file-name=libstdc++.a}}
+ifeq ($(libstdcxx),${notdir $(libstdcxx)})
+LIBGCC+=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}}
+else
+LIBGCC:=${subst \,/,${shell $(CC_FOR_TARGET) -print-libgcc-file-name}} $(libstdcxx)
+endif
+
+GCC_INCLUDE:=${word 1,${dir $(LIBGCC)}}/include
COMPILE_CXX:=$(CC) $c -nostdinc++ $(ALL_CXXFLAGS) -I$(GCC_INCLUDE) \
-fno-rtti -fno-exceptions