diff --git a/gcc/m2/Make-lang.in b/gcc/m2/Make-lang.in index d7bc7362bbf..45bfa933dca 100644 --- a/gcc/m2/Make-lang.in +++ b/gcc/m2/Make-lang.in @@ -98,9 +98,6 @@ GM2_PROG_DEP=gm2$(exeext) xgcc$(exeext) cc1gm2$(exeext) include m2/config-make -# Determine if float128 should represent the Modula-2 type LONGREAL. -host_mc_longreal := $(if $(strip $(filter powerpc64le%,$(host))),--longreal=__float128) - LIBSTDCXX=../$(TARGET_SUBDIR)/libstdc++-v3/src/.libs/libstdc++.a PGE=m2/pge$(exeext) @@ -474,8 +471,7 @@ MC_ARGS= --olang=c++ \ -I$(srcdir)/m2/gm2-gcc \ --quiet \ $(MC_COPYRIGHT) \ - --gcc-config-system \ - $(host_mc_longreal) + --gcc-config-system MCDEPS=m2/boot-bin/mc$(exeext) diff --git a/gcc/m2/configure b/gcc/m2/configure index f62f3d8729c..46530970785 100755 --- a/gcc/m2/configure +++ b/gcc/m2/configure @@ -3646,24 +3646,6 @@ $as_echo "#define HAVE_OPENDIR 1" >>confdefs.h fi -case $target in #( - powerpc64le*) : - -$as_echo "#define M2C_LONGREAL_FLOAT128 1" >>confdefs.h - ;; #( - *) : - ;; -esac - -case $target in #( - powerpc64le*) : - -$as_echo "#define M2C_LONGREAL_PPC64LE 1" >>confdefs.h - ;; #( - *) : - ;; -esac - ac_config_headers="$ac_config_headers gm2config.aci" cat >confcache <<\_ACEOF diff --git a/gcc/m2/configure.ac b/gcc/m2/configure.ac index efcca628068..15be50936f7 100644 --- a/gcc/m2/configure.ac +++ b/gcc/m2/configure.ac @@ -30,11 +30,5 @@ AC_CHECK_HEADERS(sys/types.h) AC_HEADER_DIRENT AC_CHECK_LIB([c],[opendir],[AC_DEFINE([HAVE_OPENDIR],[1],[found opendir])]) -AS_CASE([$target],[powerpc64le*], - [AC_DEFINE([M2C_LONGREAL_FLOAT128],[1],[use __float128 for LONGREAL])]) - -AS_CASE([$target],[powerpc64le*], - [AC_DEFINE([M2C_LONGREAL_PPC64LE],[1],[target is ppc64le])]) - AC_CONFIG_HEADERS(gm2config.aci, [echo timestamp > stamp-h]) AC_OUTPUT diff --git a/gcc/m2/gm2-compiler/M2Options.def b/gcc/m2/gm2-compiler/M2Options.def index a5ecb82800d..4e5f4993f82 100644 --- a/gcc/m2/gm2-compiler/M2Options.def +++ b/gcc/m2/gm2-compiler/M2Options.def @@ -970,6 +970,38 @@ PROCEDURE SetCaseEnumChecking (value: BOOLEAN) ; PROCEDURE SetDebugBuiltins (value: BOOLEAN) ; +(* + SetIBMLongDouble - enable/disable LONGREAL to map onto the + IBM long double 128 bit data type. + (Only available on the ppc). +*) + +PROCEDURE SetIBMLongDouble (value: BOOLEAN) ; + + +(* + GetIBMLongDouble - return the value of IBMLongDouble. +*) + +PROCEDURE GetIBMLongDouble () : BOOLEAN ; + + +(* + SetIEEELongDouble - enable/disable LONGREAL to map onto the + IEEE long double 128 bit data type. + (Only available on the ppc). +*) + +PROCEDURE SetIEEELongDouble (value: BOOLEAN) ; + + +(* + GetIEEELongDouble - return the value of IEEELongDouble. +*) + +PROCEDURE GetIEEELongDouble () : BOOLEAN ; + + (* FinaliseOptions - once all options have been parsed we set any inferred values. diff --git a/gcc/m2/gm2-compiler/M2Options.mod b/gcc/m2/gm2-compiler/M2Options.mod index 01562a1a124..ae4980860b0 100644 --- a/gcc/m2/gm2-compiler/M2Options.mod +++ b/gcc/m2/gm2-compiler/M2Options.mod @@ -31,7 +31,8 @@ FROM FIO IMPORT StdErr ; FROM libc IMPORT exit, printf ; FROM Debug IMPORT Halt ; FROM m2linemap IMPORT location_t ; -FROM m2configure IMPORT FullPathCPP ; +FROM m2configure IMPORT FullPathCPP, TargetIEEEQuadDefault ; +FROM M2Error IMPORT InternalError ; FROM DynamicStrings IMPORT String, Length, InitString, Mark, Slice, EqualArray, @@ -74,6 +75,8 @@ VAR MPFlag, MDFlag, MMDFlag, + IBMLongDouble, + IEEELongDouble, UselistFlag, CC1Quiet, SeenSources : BOOLEAN ; @@ -1594,6 +1597,79 @@ BEGIN END SetDebugBuiltins ; +(* + SetIBMLongDouble - enable/disable LONGREAL to map onto the + IBM long double 128 bit data type. + (Only available on the ppc). +*) + +PROCEDURE SetIBMLongDouble (value: BOOLEAN) ; +BEGIN + IBMLongDouble := value ; + IF value + THEN + IEEELongDouble := FALSE + END +END SetIBMLongDouble ; + + +(* + GetIBMLongDouble - return the value of IBMLongDouble. +*) + +PROCEDURE GetIBMLongDouble () : BOOLEAN ; +BEGIN + RETURN IBMLongDouble +END GetIBMLongDouble ; + + +(* + SetIEEELongDouble - enable/disable LONGREAL to map onto the + IEEE long double 128 bit data type. + (Only available on the ppc). +*) + +PROCEDURE SetIEEELongDouble (value: BOOLEAN) ; +BEGIN + IEEELongDouble := value ; + IF value + THEN + IBMLongDouble := FALSE + END +END SetIEEELongDouble ; + + +(* + GetIEEELongDouble - return the value of IEEELongDouble. +*) + +PROCEDURE GetIEEELongDouble () : BOOLEAN ; +BEGIN + RETURN IEEELongDouble +END GetIEEELongDouble ; + + +(* + InitializeLongDoubleFlags - initialize the long double related flags + with default values given during gcc configure. +*) + +PROCEDURE InitializeLongDoubleFlags ; +BEGIN + IBMLongDouble := FALSE ; + IEEELongDouble := FALSE ; + CASE TargetIEEEQuadDefault () OF + + -1: | + 0: IBMLongDouble := TRUE | + 1: IEEELongDouble := TRUE + + ELSE + InternalError ('unexpected value returned from TargetIEEEQuadDefault ()') + END +END InitializeLongDoubleFlags ; + + BEGIN cflag := FALSE ; (* -c. *) RuntimeModuleOverride := InitString (DefaultRuntimeModuleOverride) ; @@ -1673,6 +1749,7 @@ BEGIN MFarg := NIL ; MTFlag := NIL ; MQFlag := NIL ; + InitializeLongDoubleFlags ; M2Prefix := InitString ('') ; M2PathName := InitString ('') END M2Options. diff --git a/gcc/m2/gm2-gcc/m2configure.cc b/gcc/m2/gm2-gcc/m2configure.cc index feb2810b3de..9e0e82f86c0 100644 --- a/gcc/m2/gm2-gcc/m2configure.cc +++ b/gcc/m2/gm2-gcc/m2configure.cc @@ -23,10 +23,6 @@ along with GNU Modula-2; see the file COPYING3. If not see #include "system.h" #include "libiberty.h" -#include "config.h" -#include "system.h" -#include "libiberty.h" - #include "gcc-consolidation.h" #include "../gm2-lang.h" @@ -100,50 +96,17 @@ m2configure_FullPathCPP (void) return NULL; } -/* Return true if M2C_LONGREAL_FLOAT128 is defined. */ +/* Return the value of TARGET_IEEEQUAD_DEFAULT. If it is undefined + -1 is returned. A value of 0 indicates the default target long + double uses the IBM 128 representation. A value of 1 indicates + the default target long double (LONGREAL) is __float128. */ -bool -m2configure_M2CLongRealFloat128 (void) +int +m2configure_TargetIEEEQuadDefault (void) { -#if defined(M2C_LONGREAL_FLOAT128) - return true; +#ifdef TARGET_IEEEQUAD_DEFAULT + return TARGET_IEEEQUAD_DEFAULT; #else - return false; -#endif -} - -/* Return true if M2C_LONGREAL_IBM128 is defined. */ - -bool -m2configure_M2CLongRealIBM128 (void) -{ -#if defined(M2C_LONGREAL_IBM128) - return true; -#else - return false; -#endif -} - -/* Return true if M2C_LONGREAL_LONGDOUBLE is defined. */ - -bool -m2configure_M2CLongRealLongDouble (void) -{ -#if defined(M2C_LONGREAL_LONGDOUBLE) - return true; -#else - return false; -#endif -} - -/* Return true if the target is ppc64le. */ - -bool -m2configure_M2CLongRealLongDoublePPC64LE (void) -{ -#if defined(M2C_LONGREAL_PPC64LE) - return true; -#else - return false; + return -1; #endif } diff --git a/gcc/m2/gm2-gcc/m2configure.def b/gcc/m2/gm2-gcc/m2configure.def index 0c038b9dd48..9e320490d85 100644 --- a/gcc/m2/gm2-gcc/m2configure.def +++ b/gcc/m2/gm2-gcc/m2configure.def @@ -41,38 +41,15 @@ PROCEDURE FullPathCPP () : ADDRESS ; (* - M2CLongRealFloat128 - return true if M2C_LONGREAL_FLOAT128 - is defined. - Only one of M2CLongRealFloat128, - M2CLongRealIBM128, - M2CLongRealLongDouble will be set true. + TargetIEEEQuadDefault - return the value of TARGET_IEEEQUAD_DEFAULT. + If it is undefined -1 is returned. + A value of 0 indicates the default target long + double uses the IBM 128 representation. + A value of 1 indicates the default target long + double (LONGREAL) is __float128. *) -PROCEDURE M2CLongRealFloat128 () : BOOLEAN ; - - -(* - M2CLongRealIBM128 - return true if M2C_LONGREAL_IBM128 - is defined. -*) - -PROCEDURE M2CLongRealIBM128 () : BOOLEAN ; - - -(* - M2CLongRealLongDouble - return true if M2C_LONGREAL_LONGDOUBLE - is defined. This is true if the LONGREAL - maps onto the default gcc long double type. -*) - -PROCEDURE M2CLongRealLongDouble () : BOOLEAN ; - - -(* - M2CLongRealLongDoublePPC64LE - return true if the target is ppc64le. -*) - -PROCEDURE M2CLongRealLongDoublePPC64LE () : BOOLEAN ; +PROCEDURE TargetIEEEQuadDefault () : INTEGER ; END m2configure. diff --git a/gcc/m2/gm2-gcc/m2configure.h b/gcc/m2/gm2-gcc/m2configure.h index a8256001428..dc4c11670e6 100644 --- a/gcc/m2/gm2-gcc/m2configure.h +++ b/gcc/m2/gm2-gcc/m2configure.h @@ -41,17 +41,8 @@ along with GNU Modula-2; see the file COPYING3. If not see EXTERN char * m2configure_FullPathCPP (void); -EXTERN bool -m2configure_M2CLongRealFloat128 (void); - -EXTERN bool -m2configure_M2CLongRealIBM128 (void); - -EXTERN bool -m2configure_M2CLongRealLongDouble (void); - -EXTERN bool -m2configure_M2CLongRealLongDoublePPC64LE (void); +EXTERN int +m2configure_TargetIEEEQuadDefault (void); #undef EXTERN #endif /* m2configure_h. */ diff --git a/gcc/m2/gm2-gcc/m2options.h b/gcc/m2/gm2-gcc/m2options.h index 3d46dc8deed..01256a9fc80 100644 --- a/gcc/m2/gm2-gcc/m2options.h +++ b/gcc/m2/gm2-gcc/m2options.h @@ -148,6 +148,10 @@ EXTERN char *M2Options_GetM2PathName (void); EXTERN int M2Options_SetUninitVariableChecking (bool value, const char *arg); EXTERN void M2Options_SetCaseEnumChecking (bool value); EXTERN void M2Options_SetDebugBuiltins (bool value); +EXTERN void M2Options_SetIBMLongDouble (bool value); +EXTERN bool M2Options_GetIBMLongDouble (void); +EXTERN void M2Options_SetIEEELongDouble (bool value); +EXTERN bool M2Options_GetIEEELongDouble (void); #undef EXTERN #endif /* m2options_h. */ diff --git a/gcc/m2/gm2-gcc/m2type.cc b/gcc/m2/gm2-gcc/m2type.cc index e00987a1c3b..571923c08ef 100644 --- a/gcc/m2/gm2-gcc/m2type.cc +++ b/gcc/m2/gm2-gcc/m2type.cc @@ -1441,22 +1441,20 @@ build_m2_real_node (void) static tree build_m2_long_real_node (void) { - tree c; + tree longreal; /* Define `LONGREAL'. */ - - if (m2configure_M2CLongRealFloat128 ()) - c = float128_type_node; - else if (m2configure_M2CLongRealIBM128 ()) + if (M2Options_GetIBMLongDouble ()) { - c = make_node (REAL_TYPE); - TYPE_PRECISION (c) = LONG_DOUBLE_TYPE_SIZE; + longreal = make_node (REAL_TYPE); + TYPE_PRECISION (longreal) = LONG_DOUBLE_TYPE_SIZE; } + else if (M2Options_GetIEEELongDouble ()) + longreal = float128_type_node; else - c = long_double_type_node; - - layout_type (c); - return c; + longreal = long_double_type_node; + layout_type (longreal); + return longreal; } static tree diff --git a/gcc/m2/gm2-lang.cc b/gcc/m2/gm2-lang.cc index cfebfc6ca53..86124df603a 100644 --- a/gcc/m2/gm2-lang.cc +++ b/gcc/m2/gm2-lang.cc @@ -639,6 +639,16 @@ gm2_langhook_handle_option ( case OPT_fm2_whole_program: M2Options_SetWholeProgram (value); return 1; +#ifdef OPT_mabi_ibmlongdouble + case OPT_mabi_ibmlongdouble: + M2Options_SetIBMLongDouble (value); + return 1; +#endif +#ifdef OPT_mabi_ieeelongdouble + case OPT_mabi_ieeelongdouble: + M2Options_SetIEEELongDouble (value); + return 1; +#endif case OPT_flocation_: if (strcmp (arg, "builtins") == 0) { diff --git a/gcc/m2/gm2config.aci.in b/gcc/m2/gm2config.aci.in index 5228ef09a7d..cb9f5054f44 100644 --- a/gcc/m2/gm2config.aci.in +++ b/gcc/m2/gm2config.aci.in @@ -48,12 +48,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* use __float128 for LONGREAL */ -#undef M2C_LONGREAL_FLOAT128 - -/* target is ppc64le */ -#undef M2C_LONGREAL_PPC64LE - /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT diff --git a/gcc/m2/gm2spec.cc b/gcc/m2/gm2spec.cc index 6769ecc194a..a4faf88027a 100644 --- a/gcc/m2/gm2spec.cc +++ b/gcc/m2/gm2spec.cc @@ -475,15 +475,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, /* True if we should set up include paths and library paths. */ bool allow_libraries = true; -#ifdef M2C_LONGREAL_PPC64LE - /* Should we add -mabi=ieeelongdouble by default? */ -#ifdef M2C_LONGREAL_FLOAT128 - bool need_default_mabi = true; -#else - bool need_default_mabi = false; -#endif -#endif - #if defined(DEBUG_ARG) printf ("argc = %d\n", argc); fprintf (stderr, "Incoming:"); @@ -589,16 +580,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, args[i] |= SKIPOPT; /* We will add the option if it is needed. */ push_back_Ipath (decoded_options[i].arg); break; -#if defined(OPT_mabi_ibmlongdouble) - case OPT_mabi_ibmlongdouble: - need_default_mabi = false; /* User has specified a -mabi. */ - break; -#endif -#if defined(OPT_mabi_ieeelongdouble) - case OPT_mabi_ieeelongdouble: - need_default_mabi = true; /* User has specified a -mabi. */ - break; -#endif case OPT_nostdlib: case OPT_nostdlib__: case OPT_nodefaultlibs: @@ -868,11 +849,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, if (need_plugin) append_option (OPT_fplugin_, "m2rte", 1); -#ifdef M2C_LONGREAL_PPC64LE - if (need_default_mabi) - append_option (OPT_mabi_ieeelongdouble, NULL, 1); -#endif - if (linking) { if (allow_libraries) diff --git a/libgm2/Makefile.am b/libgm2/Makefile.am index 72391d01291..ef29732dbed 100644 --- a/libgm2/Makefile.am +++ b/libgm2/Makefile.am @@ -35,8 +35,6 @@ AM_CFLAGS = -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) TOP_GCCDIR := $(shell cd $(top_srcdir) && cd .. && pwd) -TARGET_LONGDOUBLE_ABI := $(if $(strip $(filter powerpc64le%,$(target))),-mabi=ieeelongdouble) - GCC_DIR = $(TOP_GCCDIR)/gcc GM2_SRC = $(GCC_DIR)/m2 @@ -101,7 +99,6 @@ AM_MAKEFLAGS = \ "WERROR=$(WERROR)" \ "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "LIBTOOL=$(GM2_BUILDDIR)/libtool" \ "DARWIN_AT_RPATH=$(DARWIN_AT_RPATH)" diff --git a/libgm2/Makefile.in b/libgm2/Makefile.in index 4c30d2b034f..f259df7842c 100644 --- a/libgm2/Makefile.in +++ b/libgm2/Makefile.in @@ -347,7 +347,6 @@ MAKEOVERRIDES = AM_CFLAGS = -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER) TOP_GCCDIR := $(shell cd $(top_srcdir) && cd .. && pwd) -TARGET_LONGDOUBLE_ABI := $(if $(strip $(filter powerpc64le%,$(target))),-mabi=ieeelongdouble) GCC_DIR = $(TOP_GCCDIR)/gcc GM2_SRC = $(GCC_DIR)/m2 SUBDIRS = libm2min libm2log libm2cor libm2iso libm2pim @@ -403,7 +402,6 @@ AM_MAKEFLAGS = \ "WERROR=$(WERROR)" \ "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "LIBTOOL=$(GM2_BUILDDIR)/libtool" \ "DARWIN_AT_RPATH=$(DARWIN_AT_RPATH)" diff --git a/libgm2/libm2cor/Makefile.am b/libgm2/libm2cor/Makefile.am index a515bd2c886..edf9243a5b8 100644 --- a/libgm2/libm2cor/Makefile.am +++ b/libgm2/libm2cor/Makefile.am @@ -91,7 +91,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" # Subdir rules rely on $(FLAGS_TO_PASS) @@ -116,14 +115,14 @@ libm2cordir = libm2cor libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES))) libm2cor_la_CFLAGS = \ -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso \ - -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso \ - $(TARGET_LONGDOUBLE_ABI) + -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso + libm2cor_la_M2FLAGS = \ -fm2-pathname=m2cor -I. -I$(GM2_SRC)/gm2-libs-coroutines \ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ - -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2cor \ - $(TARGET_LONGDOUBLE_ABI) + -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2cor + if TARGET_DARWIN libm2cor_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2cor/Makefile.in b/libgm2/libm2cor/Makefile.in index faf2433249f..63299388dd8 100644 --- a/libgm2/libm2cor/Makefile.in +++ b/libgm2/libm2cor/Makefile.in @@ -455,7 +455,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" @@ -475,15 +474,13 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_CORLIB_TRUE@libm2cor_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2cor_la_SOURCES))) @BUILD_CORLIB_TRUE@libm2cor_la_CFLAGS = \ @BUILD_CORLIB_TRUE@ -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso \ -@BUILD_CORLIB_TRUE@ -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso \ -@BUILD_CORLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_CORLIB_TRUE@ -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso @BUILD_CORLIB_TRUE@libm2cor_la_M2FLAGS = \ @BUILD_CORLIB_TRUE@ -fm2-pathname=m2cor -I. -I$(GM2_SRC)/gm2-libs-coroutines \ @BUILD_CORLIB_TRUE@ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ @BUILD_CORLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ -@BUILD_CORLIB_TRUE@ -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2cor \ -@BUILD_CORLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_CORLIB_TRUE@ -fm2-g -g -Wcase-enum -Wreturn-type -fcase -fm2-prefix=m2cor @BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@libm2cor_la_link_flags = \ @BUILD_CORLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) diff --git a/libgm2/libm2iso/Makefile.am b/libgm2/libm2iso/Makefile.am index 01b5dc7001a..ee9afde8516 100644 --- a/libgm2/libm2iso/Makefile.am +++ b/libgm2/libm2iso/Makefile.am @@ -90,7 +90,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" # Subdir rules rely on $(FLAGS_TO_PASS) @@ -199,14 +198,14 @@ libm2iso_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2iso_la_ libm2iso_la_CFLAGS = \ $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs \ -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include \ - -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include \ - $(TARGET_LONGDOUBLE_ABI) + -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include + libm2iso_la_M2FLAGS = \ -fm2-pathname=m2iso -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso \ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ -fiso -fextended-opaque -fm2-g -g -Wcase-enum \ - -Wreturn-type -fcase -fm2-prefix=m2iso \ - $(TARGET_LONGDOUBLE_ABI) + -Wreturn-type -fcase -fm2-prefix=m2iso + if TARGET_DARWIN libm2iso_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2iso/Makefile.in b/libgm2/libm2iso/Makefile.in index 1d04835fbf0..964c6da8527 100644 --- a/libgm2/libm2iso/Makefile.in +++ b/libgm2/libm2iso/Makefile.in @@ -480,7 +480,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" @@ -586,15 +585,13 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_ISOLIB_TRUE@libm2iso_la_CFLAGS = \ @BUILD_ISOLIB_TRUE@ $(C_INCLUDES) -I. -I.. -I$(GM2_SRC)/gm2-libs-iso -I$(GM2_SRC)/gm2-libs \ @BUILD_ISOLIB_TRUE@ -DBUILD_GM2_LIBS -I@srcdir@/../ -I../../../gcc -I$(GCC_DIR) -I$(GCC_DIR)/../include \ -@BUILD_ISOLIB_TRUE@ -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include \ -@BUILD_ISOLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_ISOLIB_TRUE@ -I../../libgcc -I$(GCC_DIR)/../libgcc -I$(MULTIBUILDTOP)../../gcc/include @BUILD_ISOLIB_TRUE@libm2iso_la_M2FLAGS = \ @BUILD_ISOLIB_TRUE@ -fm2-pathname=m2iso -I. -Ilibm2iso -I$(GM2_SRC)/gm2-libs-iso \ @BUILD_ISOLIB_TRUE@ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ @BUILD_ISOLIB_TRUE@ -fiso -fextended-opaque -fm2-g -g -Wcase-enum \ -@BUILD_ISOLIB_TRUE@ -Wreturn-type -fcase -fm2-prefix=m2iso \ -@BUILD_ISOLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_ISOLIB_TRUE@ -Wreturn-type -fcase -fm2-prefix=m2iso @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@libm2iso_la_link_flags = \ @BUILD_ISOLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) diff --git a/libgm2/libm2log/Makefile.am b/libgm2/libm2log/Makefile.am index 8dadaae9538..ac690c89d2e 100644 --- a/libgm2/libm2log/Makefile.am +++ b/libgm2/libm2log/Makefile.am @@ -90,7 +90,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" # Subdir rules rely on $(FLAGS_TO_PASS) @@ -138,8 +137,8 @@ libm2log_la_M2FLAGS = \ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ -Wcase-enum -Wreturn-type \ - -fcase -fm2-prefix=m2log \ - $(TARGET_LONGDOUBLE_ABI) + -fcase -fm2-prefix=m2log + if TARGET_DARWIN libm2log_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2log/Makefile.in b/libgm2/libm2log/Makefile.in index 4c371350ce2..bd0f834bdf0 100644 --- a/libgm2/libm2log/Makefile.in +++ b/libgm2/libm2log/Makefile.in @@ -443,7 +443,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" @@ -487,8 +486,7 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_LOGLIB_TRUE@ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs \ @BUILD_LOGLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ @BUILD_LOGLIB_TRUE@ -Wcase-enum -Wreturn-type \ -@BUILD_LOGLIB_TRUE@ -fcase -fm2-prefix=m2log \ -@BUILD_LOGLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_LOGLIB_TRUE@ -fcase -fm2-prefix=m2log @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@libm2log_la_link_flags = \ @BUILD_LOGLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1) diff --git a/libgm2/libm2min/Makefile.am b/libgm2/libm2min/Makefile.am index ab627e88222..b95b5dd3ea5 100644 --- a/libgm2/libm2min/Makefile.am +++ b/libgm2/libm2min/Makefile.am @@ -89,7 +89,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" # Subdir rules rely on $(FLAGS_TO_PASS) @@ -104,12 +103,12 @@ libm2mindir = libm2min toolexeclib_LTLIBRARIES = libm2min.la libm2min_la_SOURCES = $(M2MODS) libc.c libm2min_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2min_la_SOURCES))) -libm2min_la_CFLAGS = -I. -I$(GM2_SRC)/gm2-libs-min -I$(GM2_SRC)/gm2-libs $(TARGET_LONGDOUBLE_ABI) +libm2min_la_CFLAGS = -I. -I$(GM2_SRC)/gm2-libs-min -I$(GM2_SRC)/gm2-libs libm2min_la_M2FLAGS = \ -fm2-pathname=m2min -I. -I$(GM2_SRC)/gm2-libs-min \ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs -fno-exceptions \ - -fno-m2-plugin -fno-scaffold-dynamic -fno-scaffold-main -fm2-prefix=m2min \ - $(TARGET_LONGDOUBLE_ABI) + -fno-m2-plugin -fno-scaffold-dynamic -fno-scaffold-main -fm2-prefix=m2min + if TARGET_DARWIN libm2min_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2min/Makefile.in b/libgm2/libm2min/Makefile.in index 1d723e4d721..453a3acf468 100644 --- a/libgm2/libm2min/Makefile.in +++ b/libgm2/libm2min/Makefile.in @@ -432,7 +432,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" @@ -446,12 +445,11 @@ libm2mindir = libm2min toolexeclib_LTLIBRARIES = libm2min.la libm2min_la_SOURCES = $(M2MODS) libc.c libm2min_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2min_la_SOURCES))) -libm2min_la_CFLAGS = -I. -I$(GM2_SRC)/gm2-libs-min -I$(GM2_SRC)/gm2-libs $(TARGET_LONGDOUBLE_ABI) +libm2min_la_CFLAGS = -I. -I$(GM2_SRC)/gm2-libs-min -I$(GM2_SRC)/gm2-libs libm2min_la_M2FLAGS = \ -fm2-pathname=m2min -I. -I$(GM2_SRC)/gm2-libs-min \ -fm2-pathname=m2pim -I$(GM2_SRC)/gm2-libs -fno-exceptions \ - -fno-m2-plugin -fno-scaffold-dynamic -fno-scaffold-main -fm2-prefix=m2min \ - $(TARGET_LONGDOUBLE_ABI) + -fno-m2-plugin -fno-scaffold-dynamic -fno-scaffold-main -fm2-prefix=m2min @TARGET_DARWIN_FALSE@libm2min_la_link_flags = $(am__append_1) @TARGET_DARWIN_TRUE@libm2min_la_link_flags = \ diff --git a/libgm2/libm2pim/Makefile.am b/libgm2/libm2pim/Makefile.am index 4c5e046a1c9..b575cabe2db 100644 --- a/libgm2/libm2pim/Makefile.am +++ b/libgm2/libm2pim/Makefile.am @@ -88,7 +88,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" # Subdir rules rely on $(FLAGS_TO_PASS) @@ -168,14 +167,14 @@ libm2pimdir = libm2pim libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES))) libm2pim_la_CFLAGS = \ -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso \ - -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso \ - $(TARGET_LONGDOUBLE_ABI) + -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso + libm2pim_la_M2FLAGS = \ -fm2-pathname=m2pim -I. -I$(GM2_SRC)/gm2-libs \ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ -fm2-g -g -Wcase-enum -Wreturn-type \ - -fcase -fm2-prefix=m2pim \ - $(TARGET_LONGDOUBLE_ABI) + -fcase -fm2-prefix=m2pim + if TARGET_DARWIN libm2pim_la_link_flags = -Wl,-undefined,dynamic_lookup else diff --git a/libgm2/libm2pim/Makefile.in b/libgm2/libm2pim/Makefile.in index eca7e8501ad..85623d0f82f 100644 --- a/libgm2/libm2pim/Makefile.in +++ b/libgm2/libm2pim/Makefile.in @@ -467,7 +467,6 @@ AM_MAKEFLAGS = \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ "WERROR=$(WERROR)" \ - "TARGET_LONGDOUBLE_ABI=$(TARGET_LONGDOUBLE_ABI)" \ "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" @@ -545,15 +544,13 @@ FLAGS_TO_PASS = $(AM_MAKEFLAGS) @BUILD_PIMLIB_TRUE@libm2pim_la_DEPENDENCIES = SYSTEM.def $(addsuffix .lo, $(basename $(libm2pim_la_SOURCES))) @BUILD_PIMLIB_TRUE@libm2pim_la_CFLAGS = \ @BUILD_PIMLIB_TRUE@ -I. -I.. -I$(GM2_SRC)/gm2-libs -I$(GM2_SRC)/gm2-libs-iso \ -@BUILD_PIMLIB_TRUE@ -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso \ -@BUILD_PIMLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_PIMLIB_TRUE@ -DBUILD_GM2_LIBS -I@srcdir@/../ -I@srcdir@/../libm2iso @BUILD_PIMLIB_TRUE@libm2pim_la_M2FLAGS = \ @BUILD_PIMLIB_TRUE@ -fm2-pathname=m2pim -I. -I$(GM2_SRC)/gm2-libs \ @BUILD_PIMLIB_TRUE@ -fm2-pathname=m2iso -I$(GM2_SRC)/gm2-libs-iso \ @BUILD_PIMLIB_TRUE@ -fm2-g -g -Wcase-enum -Wreturn-type \ -@BUILD_PIMLIB_TRUE@ -fcase -fm2-prefix=m2pim \ -@BUILD_PIMLIB_TRUE@ $(TARGET_LONGDOUBLE_ABI) +@BUILD_PIMLIB_TRUE@ -fcase -fm2-prefix=m2pim @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@libm2pim_la_link_flags = \ @BUILD_PIMLIB_TRUE@@TARGET_DARWIN_FALSE@ $(am__append_1)