re PR ada/58239 (pretty-print.c:789: undefined reference to `operator delete(void*)')

PR ada/58239
gnattools/
	* Makefile.in (CXX_LFLAGS): New.
	(TOOLS_FLAGS_TO_PASS_NATIVE): Pass CXX and CXX_LFLAGS.
	(TOOLS_FLAGS_TO_PASS_RE): Likewise.
	(TOOLS_FLAGS_TO_PASS_CROSS): Pass CXX.
gcc/ada/
	* gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
	(GCC_LINK): Use CXX instead of CC.
	* gcc-interface/Make-lang.in (CXX_LFLAGS): New.
	(ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.

Co-Authored-By: Iain Sandoe <iain@codesourcery.com>

From-SVN: r202150
This commit is contained in:
Eric Botcazou 2013-09-01 16:51:41 +00:00 committed by Eric Botcazou
parent cec8583c75
commit d775b5ea3b
5 changed files with 40 additions and 3 deletions

View File

@ -1,3 +1,12 @@
2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
Iain Sandoe <iain@codesourcery.com>
PR ada/58239
* gcc-interface/Makefile.in (GCC_LINK_FLAGS): Add -static-libstdc++.
(GCC_LINK): Use CXX instead of CC.
* gcc-interface/Make-lang.in (CXX_LFLAGS): New.
(ADA_TOOLS_FLAGS_TO_PASS): Pass CXX, and CXX_LFLAGS for native.
2013-08-13 Eric Botcazou <ebotcazou@adacore.com> 2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias * gcc-interface/decl.c (gnat_to_gnu_entity): Do not bother about alias

View File

@ -111,6 +111,12 @@ ada: gnat1$(exeext) gnatbind$(exeext)
# Tell GNU Make to ignore these, if they exist. # Tell GNU Make to ignore these, if they exist.
.PHONY: ada .PHONY: ada
CXX_LFLAGS = \
-B../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
-B../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs \
-L../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
-L../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs
# There are too many Ada sources to check against here. Let's # There are too many Ada sources to check against here. Let's
# always force the recursive make. # always force the recursive make.
ifeq ($(build), $(host)) ifeq ($(build), $(host))
@ -119,6 +125,7 @@ ifeq ($(build), $(host))
# tree. # tree.
ADA_TOOLS_FLAGS_TO_PASS=\ ADA_TOOLS_FLAGS_TO_PASS=\
CC="../../xgcc -B../../" \ CC="../../xgcc -B../../" \
CXX="../../xg++ -B../../ $(CXX_LFLAGS)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \ $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I- -I../rts" \ ADA_INCLUDES="-I- -I../rts" \
GNATMAKE="../../gnatmake" \ GNATMAKE="../../gnatmake" \
@ -136,6 +143,7 @@ ifeq ($(build), $(host))
ADA_TOOLS_FLAGS_TO_PASS=\ ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \ CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \ $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \ ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
GNATMAKE="gnatmake" \ GNATMAKE="gnatmake" \
@ -158,6 +166,7 @@ else
# built runtime. # built runtime.
ADA_TOOLS_FLAGS_TO_PASS=\ ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \ CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \ $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I../rts" \ ADA_INCLUDES="-I../rts" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \ GNATMAKE="$(GNATMAKE_FOR_HOST)" \
@ -172,6 +181,7 @@ else
endif endif
ADA_TOOLS_FLAGS_TO_PASS=\ ADA_TOOLS_FLAGS_TO_PASS=\
CC="$(CC)" \ CC="$(CC)" \
CXX="$(CXX)" \
$(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \ $(COMMON_FLAGS_TO_PASS) $(ADA_FLAGS_TO_PASS) \
ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \ ADA_INCLUDES="-I$(RTS_DIR)../adainclude -I$(RTS_DIR)" \
GNATMAKE="$(GNATMAKE_FOR_HOST)" \ GNATMAKE="$(GNATMAKE_FOR_HOST)" \

View File

@ -198,7 +198,7 @@ RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
# Link flags used to build gnat tools. By default we prefer to statically # Link flags used to build gnat tools. By default we prefer to statically
# link with libgcc to avoid a dependency on shared libgcc (which is tricky # link with libgcc to avoid a dependency on shared libgcc (which is tricky
# to deal with as it may conflict with the libgcc provided by the system). # to deal with as it may conflict with the libgcc provided by the system).
GCC_LINK_FLAGS=-static-libgcc GCC_LINK_FLAGS=-static-libstdc++ -static-libgcc
# End of variables for you to override. # End of variables for you to override.
@ -2275,7 +2275,7 @@ ifeq ($(strip $(filter-out darwin%,$(osys))),)
GMEM_LIB = gmemlib GMEM_LIB = gmemlib
LIBRARY_VERSION := $(LIB_VERSION) LIBRARY_VERSION := $(LIB_VERSION)
soext = .dylib soext = .dylib
GCC_LINK_FLAGS= GCC_LINK_FLAGS=-static-libstdc++
endif endif
# ARM Nucleus # ARM Nucleus
@ -2397,7 +2397,7 @@ TOOLS_FLAGS_TO_PASS= \
"GNATLINK=$(GNATLINK)" \ "GNATLINK=$(GNATLINK)" \
"GNATBIND=$(GNATBIND)" "GNATBIND=$(GNATBIND)"
GCC_LINK=$(CC) $(GCC_LINK_FLAGS) $(ADA_INCLUDES) GCC_LINK=$(CXX) $(GCC_LINK_FLAGS) $(ADA_INCLUDES)
# Build directory for the tools. Let's copy the target-dependent # Build directory for the tools. Let's copy the target-dependent
# sources using the same mechanism as for gnatlib. The other sources are # sources using the same mechanism as for gnatlib. The other sources are

View File

@ -1,3 +1,12 @@
2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
Iain Sandoe <iain@codesourcery.com>
PR ada/58239
* Makefile.in (CXX_LFLAGS): New.
(TOOLS_FLAGS_TO_PASS_NATIVE): Pass CXX and CXX_LFLAGS.
(TOOLS_FLAGS_TO_PASS_RE): Likewise.
(TOOLS_FLAGS_TO_PASS_CROSS): Pass CXX.
2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> 2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* configure.ac (mips-sgi-irix*): Remove. * configure.ac (mips-sgi-irix*): Remove.

View File

@ -63,9 +63,16 @@ INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada -I$(fsrcdir)/config \
-I$(fsrcdir)/../include -I$(fsrcdir) -I$(fsrcdir)/../include -I$(fsrcdir)
ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada
CXX_LFLAGS = \
-B../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
-B../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs \
-L../../../$(target_noncanonical)/libstdc++-v3/src/.libs \
-L../../../$(target_noncanonical)/libstdc++-v3/libsupc++/.libs
# Variables for gnattools, native # Variables for gnattools, native
TOOLS_FLAGS_TO_PASS_NATIVE= \ TOOLS_FLAGS_TO_PASS_NATIVE= \
"CC=../../xgcc -B../../" \ "CC=../../xgcc -B../../" \
"CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \
"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \ "LDFLAGS=$(LDFLAGS)" \
"ADAFLAGS=$(ADAFLAGS)" \ "ADAFLAGS=$(ADAFLAGS)" \
@ -83,6 +90,7 @@ TOOLS_FLAGS_TO_PASS_NATIVE= \
# Variables for regnattools # Variables for regnattools
TOOLS_FLAGS_TO_PASS_RE= \ TOOLS_FLAGS_TO_PASS_RE= \
"CC=../../xgcc -B../../" \ "CC=../../xgcc -B../../" \
"CXX=../../xg++ -B../../ $(CXX_LFLAGS)" \
"CFLAGS=$(CFLAGS)" \ "CFLAGS=$(CFLAGS)" \
"ADAFLAGS=$(ADAFLAGS)" \ "ADAFLAGS=$(ADAFLAGS)" \
"ADA_CFLAGS=$(ADA_CFLAGS)" \ "ADA_CFLAGS=$(ADA_CFLAGS)" \
@ -99,6 +107,7 @@ TOOLS_FLAGS_TO_PASS_RE= \
# Variables for gnattools, cross # Variables for gnattools, cross
TOOLS_FLAGS_TO_PASS_CROSS= \ TOOLS_FLAGS_TO_PASS_CROSS= \
"CC=$(CC)" \ "CC=$(CC)" \
"CXX=$(CXX)" \
"CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \ "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)" \
"LDFLAGS=$(LDFLAGS)" \ "LDFLAGS=$(LDFLAGS)" \
"ADAFLAGS=$(ADAFLAGS)" \ "ADAFLAGS=$(ADAFLAGS)" \