# DP: - Install the shared Ada libraries as '.so.1', not '.so' to conform # DP: to the Debian policy. # DP: - Don't include a runtime link path (-rpath), when linking binaries. # DP: - Build the shared libraries on hppa-linux. # DP: - Instead of building libada as a target library only, build it as # DP: both a host and, if different, target library. # DP: - Build the GNAT tools in their top-level directory; do not use # DP: recursive makefiles. # DP: - Link the GNAT tools dynamically. # DP: - Fix a bug in src/gnattools/configure.ac whereby a nonexistent version # DP: of indepsw's body was selected. Regenerate configure. (PR ada/27300) # This patch seems large, but the hunks in Makefile.in are actually # generated from Makefile.def using autogen. Index: b/src/gcc/ada/gcc-interface/config-lang.in =================================================================== --- a/src/gcc/ada/gcc-interface/config-lang.in +++ b/src/gcc/ada/gcc-interface/config-lang.in @@ -37,7 +37,7 @@ outputs="ada/gcc-interface/Makefile ada/Makefile" target_libs="target-libada" -lang_dirs="gnattools" +lang_dirs="libada gnattools" # Ada is not enabled by default for the time being. build_by_default=no Index: b/src/gcc/ada/link.c =================================================================== --- a/src/gcc/ada/link.c +++ b/src/gcc/ada/link.c @@ -189,9 +189,9 @@ #elif defined (__FreeBSD__) const char *__gnat_object_file_option = ""; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -char __gnat_shared_libgnat_default = STATIC; -char __gnat_shared_libgcc_default = STATIC; +const char *__gnat_run_path_option = ""; +char __gnat_shared_libgnat_default = SHARED; +char __gnat_shared_libgcc_default = SHARED; int __gnat_link_max = 8192; unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_using_gnu_linker = 1; @@ -213,9 +213,9 @@ #elif defined (linux) || defined(__GLIBC__) const char *__gnat_object_file_option = ""; -const char *__gnat_run_path_option = "-Wl,-rpath,"; -char __gnat_shared_libgnat_default = STATIC; -char __gnat_shared_libgcc_default = STATIC; +const char *__gnat_run_path_option = ""; +char __gnat_shared_libgnat_default = SHARED; +char __gnat_shared_libgcc_default = SHARED; int __gnat_link_max = 8192; unsigned char __gnat_objlist_file_supported = 1; unsigned char __gnat_using_gnu_linker = 1; Index: b/src/gcc/ada/gcc-interface/Makefile.in =================================================================== --- a/src/gcc/ada/gcc-interface/Makefile.in +++ b/src/gcc/ada/gcc-interface/Makefile.in @@ -102,7 +102,7 @@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf -GNATBIND_FLAGS = -static -x +GNATBIND_FLAGS = -shared -x ADA_CFLAGS = ADAFLAGS = -W -Wall -gnatpg -gnata SOME_ADAFLAGS =-gnata @@ -241,7 +241,6 @@ LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) # Default is no TGT_LIB; one might be passed down or something TGT_LIB = -TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, @@ -287,30 +286,6 @@ # defined in this file into the environment. .NOEXPORT: -# Lists of files for various purposes. - -GNATLINK_OBJS = gnatlink.o \ - a-except.o ali.o alloc.o butil.o casing.o csets.o debug.o fmap.o fname.o \ - gnatvsn.o hostparm.o indepsw.o interfac.o i-c.o i-cstrin.o namet.o opt.o \ - osint.o output.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ - sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \ - types.o validsw.o widechar.o - -GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o \ - alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\ - erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \ - gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \ - make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \ - mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o \ - output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o \ - prj-conf.o prj-pp.o \ - prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o \ - prj-tree.o prj-util.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ - scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o sinfo.o sinput.o \ - sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o \ - validsw.o switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o \ - uintp.o uname.o urealp.o usage.o widechar.o scil_ll.o \ - $(EXTRA_GNATMAKE_OBJS) # Convert the target variable into a space separated list of architecture, # manufacturer, and operating system and assign each of those to its own @@ -1281,6 +1256,11 @@ GMEM_LIB = gmemlib endif +ifeq ($(strip $(filter-out hppa% unknown linux gnu,$(targ))),) + GNATLIB_SHARED = gnatlib-shared-dual + LIBRARY_VERSION := $(LIB_VERSION) +endif + ifeq ($(strip $(filter-out hppa% hp hpux10%,$(targ))),) LIBGNAT_TARGET_PAIRS = \ a-excpol.adb