Skip to content

Commit

Permalink
Merge pull request eclipse-openj9#345 from 0dvictor/StaticLink
Browse files Browse the repository at this point in the history
Disable Static-Link to libstdc++ on ARM
  • Loading branch information
pshipton authored Oct 16, 2017
2 parents ab0c325 + 8347ab2 commit 30c299f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions runtime/tr.source/trj9/build/toolcfg/gnu/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,11 @@ ifeq ($(HOST_ARCH),x)
SOLINK_FLAGS+=-m64
SOLINK_SLINK+=dl m
endif

SUPPORT_STATIC_LIBCXX = $(shell $(SOLINK_CMD) -static-libstdc++ 2>&1 | grep "unrecognized option" > /dev/null; echo $$?)
ifneq ($(SUPPORT_STATIC_LIBCXX),0)
SOLINK_FLAGS+=-static-libstdc++
endif
endif

ifeq ($(HOST_ARCH),p)
Expand All @@ -417,6 +422,11 @@ ifeq ($(HOST_ARCH),p)
SOLINK_FLAGS+=-m64 -fpic
SOLINK_SLINK+=stdc++ dl m pthread
endif

SUPPORT_STATIC_LIBCXX = $(shell $(SOLINK_CMD) -static-libstdc++ 2>&1 | grep "unrecognized option" > /dev/null; echo $$?)
ifneq ($(SUPPORT_STATIC_LIBCXX),0)
SOLINK_FLAGS+=-static-libstdc++
endif
endif

ifeq ($(HOST_ARCH),z)
Expand All @@ -428,6 +438,11 @@ ifeq ($(HOST_ARCH),z)
ifeq ($(HOST_BITS),64)
SOLINK_SLINK+=stdc++
endif

SUPPORT_STATIC_LIBCXX = $(shell $(SOLINK_CMD) -static-libstdc++ 2>&1 | grep "unrecognized option" > /dev/null; echo $$?)
ifneq ($(SUPPORT_STATIC_LIBCXX),0)
SOLINK_FLAGS+=-static-libstdc++
endif
endif

ifeq ($(HOST_ARCH),arm)
Expand All @@ -453,10 +468,4 @@ endif

SOLINK_EXTRA_ARGS+=-Wl,--version-script=$(SOLINK_VERSION_SCRIPT)

SUPPORT_STATIC_LIBCXX = $(shell $(SOLINK_CMD) -static-libstdc++ 2>&1 | grep "unrecognized option" > /dev/null; echo $$?)
ifneq ($(SUPPORT_STATIC_LIBCXX),0)
SOLINK_FLAGS+=-static-libstdc++
endif

SOLINK_FLAGS+=$(SOLINK_FLAGS_EXTRA)

0 comments on commit 30c299f

Please sign in to comment.