From patchwork Thu Jan 18 00:57:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaius Mulley X-Patchwork-Id: 188976 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp51548dyb; Wed, 17 Jan 2024 16:58:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IFmc6GbSeNmw8hUm5run/zDrqpPc9rn5sVdUSWNXRkGVqF8f1njnduizXEABlnfzqqMqMvg X-Received: by 2002:ac8:5c08:0:b0:42a:17c5:95de with SMTP id i8-20020ac85c08000000b0042a17c595demr34851qti.48.1705539504126; Wed, 17 Jan 2024 16:58:24 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705539504; cv=pass; d=google.com; s=arc-20160816; b=zeLlMO7cUCuVcEFr+wI0+hMvBiMZ2rwC8frFBudgf1SoSyyoAOg9caGnh7VCnCfP6S /AzwKsdmTp1ClIdekEICdzESHEg03oenalIrhz6163J5XXx0WfxR8ca3QZVS0JU1Y4aZ XjnJqcBzHIxEqEdyYRSCHeHwT9+GY5tBO4B7GqOxX7bRLVV8Cj2Qx3VslPTuHXLi/NLn U2QT+VcyT+kZOgTpIgFRjpe63/uutYDFN1ahYUvKEeNn2uzyMbxAKAMYmTvqIQ2P2CwP AIXYWl+Sj73A6Q0RUL77oEhTdALt7EAd5iIS5mB1VKso5z/i95dcoMjrBEYlIeM3IjQj 4zCA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mime-version:user-agent :message-id:date:subject:to:from:dkim-signature:arc-filter :dmarc-filter:delivered-to; bh=0uy0KBWvJNVuU+WcdJyVweTThXQ1jvHfBQ5wAj09NVQ=; fh=hPrbWPhweUx4V0GV9uXJqbyAzg2ABmTz7kczrAQqMmM=; b=Y+Z/bUN2a/9OA7eBYelZfmdwEAT2gP2thrHYJ8g/i+91oSs6l0rBaJ6zSLQ/wSkd6V KWblE9yAAig5qkderhVCjGboWPlMxmq2oQJNGYPJKiKu0daP3WFCa1/4xv+MDWzgLkW8 p2R7OIFsSF7eAxfFlTuF2gpXe8e1L3cfGufNvNRq/6uX4EJkYu8z7wdyqyZGKtA7D6ty beYt5Ud/7+3vaxLkeax8dLSEBhpXmr6qP6G4nQsAT8AG9jpWqrrjET+YAJjxp0WbtsYt fKIK0QRjQOy/SaLPexw2+99iU/6m2DjXX2eCOFVcL7MLCCAU924iFO6x6US+PShIQrhC Lnng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gbc8R9Kz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id u11-20020ac858cb000000b0042a1a6ad726si168788qta.141.2024.01.17.16.58.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 16:58:24 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gbc8R9Kz; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CDC5D3858C33 for ; Thu, 18 Jan 2024 00:58:23 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 2030D3858C42 for ; Thu, 18 Jan 2024 00:57:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2030D3858C42 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2030D3858C42 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::332 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705539459; cv=none; b=bHaOp7UzrUqe4IrHAkFV+pJeRWzdbkWxOT0NL0knVqiR5wO38EVUxSOJmNlyHQKlx60HB+3GZxwVJQIpqBsZQQVmgPDqPacx4F+9X/1zF2FYRz3d7b4lr0XXxvUTKjV6qH3IKAsbEFcNobkoytzdxI8WYblrdOu1WzFgL5go/XM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705539459; c=relaxed/simple; bh=nG+8PaKbMehb4TwPKp3CAcpVDY27yb7qOf2SVVxHJAI=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Eg/j88jjx5d7yLYX0drfL3pIWN8dr9zeP8V/mOxxXKJQUtJuSNhFD5FFb2vhICiT321aI2BGxOVrd5x2kt4QCMw9oBsORJ/eYws2Iv8NQ1e6w1WuoUbwRRqSyDyTpQx9aCxbN5gQRE45WlDdSgNiZl5Wq7WC6BlhiuJmomYloVs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e5afc18f5so73291595e9.3 for ; Wed, 17 Jan 2024 16:57:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705539453; x=1706144253; darn=gcc.gnu.org; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=0uy0KBWvJNVuU+WcdJyVweTThXQ1jvHfBQ5wAj09NVQ=; b=gbc8R9KzjXuSE0JV1Fe5RZy1HqwM6448lkf065gHc4WepcyDgjAILgzCn9Obk+8HrM gV23AjO/krnuWToEo8fuc/Be+xFYx7H4iLQn1Tl8I9UFoRjY3Xo9vkPC27ND8teXEEVn el7liOxvrz+ugzlZGetKOKR4jhlGA/LzvL3ZLhjbuor/m3LzbQQEUdnEN6TPoN3dUVRu cWGkMSjJD6KbCkp6G5Dfaf1DrWP2tgy5/55c+WjIBLZUaIh7JbCaZLRW2nwBNOS5Spvo q+NGCge6rfVWQwNPJpwq1AH2Ct3GGWFvDSVHAwQKLqc4oxttjWsf0Sl0xq5w7/XelOKP DDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705539453; x=1706144253; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0uy0KBWvJNVuU+WcdJyVweTThXQ1jvHfBQ5wAj09NVQ=; b=xQAbmyVpPSdDJcLmu0iYTNQMSokA8g1jGJmJmub53BBWhjzbRNCZCrCZf8xdyraEzd 9s8LAXSZ95fYFpo7EhMFVRJsGRaY9gr6md9ZBjnnM1q8yIk0VhE6Tup8eGRftMKRGjE+ i2C/RfAeXJ3lp9G6k3DkjGiyC3t0jTwE820amuV4pMFKI5Z3/OWrI0L/CiKhJzd9vcHf 5FpdITI010lp6y/Qzq9J8dNa1CdvMObXDSgPMB9BfEMHQUNdTTgn4AEcSw1HJEMB6Y34 K3bdlFr+DMoVEUngsgmX5a4ZJgL6b9vp9kyzKEfPLfG+9VAJc7Xm8n3BUgokEQDFdD0F GtGA== X-Gm-Message-State: AOJu0YzMKo1FpYyBcsuxto4KNpOXWC7yhohe4OvSsUNFYtGsxNgp7u8M 66vDSEPrsRyhY92M9lZ4FRCxf4JTYWzNzagF1vKS6NaukImQK0xomGvjIraY X-Received: by 2002:a05:600c:1992:b0:40d:949b:2cb9 with SMTP id t18-20020a05600c199200b0040d949b2cb9mr26944wmq.78.1705539452297; Wed, 17 Jan 2024 16:57:32 -0800 (PST) Received: from lancelot ([82.153.116.109]) by smtp.gmail.com with ESMTPSA id v4-20020a05600c470400b0040e45799541sm27784981wmo.15.2024.01.17.16.57.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 16:57:31 -0800 (PST) Received: from gaius by lancelot with local (Exim 4.96) (envelope-from ) id 1rQGio-00Cslm-1U; Thu, 18 Jan 2024 00:57:30 +0000 From: Gaius Mulley To: gcc-patches@gcc.gnu.org Subject: [PATCH] modula2: Many powerpc platforms do _not_ have support for IEEE754 long double [PR111956] Date: Thu, 18 Jan 2024 00:57:30 +0000 Message-ID: <87zfx3e9vp.fsf@localhost> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788387790769735900 X-GMAIL-MSGID: 1788387790769735900 ok for master ? Bootstrapped on power8 (cfarm135), power9 (cfarm120) and x86_64-linux-gnu. --- This patch corrects commit r14-4149-g81d5ca0b9b8431f1bd7a5ec8a2c94f04bb0cf032 which assummed all powerpc platforms would have IEEE754 long double. The patch ensures that cc1gm2 obtains the default IEEE754 long double availability from the configure generated tm_defines. The user command line switches -mabi=ibmlongdouble and -mabi=ieeelongdouble are implemented to override the configuration defaults. gcc/m2/ChangeLog: PR modula2/111956 * Make-lang.in (host_mc_longreal): Remove. * configure: Regenerate. * configure.ac (M2C_LONGREAL_FLOAT128): Remove. (M2C_LONGREAL_PPC64LE): Remove. * gm2-compiler/M2Options.def (SetIBMLongDouble): New procedure. (GetIBMLongDouble): New procedure function. (SetIEEELongDouble): New procedure. (GetIEEELongDouble): New procedure function. * gm2-compiler/M2Options.mod (SetIBMLongDouble): New procedure. (GetIBMLongDouble): New procedure function. (SetIEEELongDouble): New procedure. (GetIEEELongDouble): New procedure function. (InitializeLongDoubleFlags): New procedure called during module block initialization. * gm2-gcc/m2configure.cc: Remove duplicate includes. (m2configure_M2CLongRealFloat128): Remove. (m2configure_M2CLongRealIBM128): Remove. (m2configure_M2CLongRealLongDouble): Remove. (m2configure_M2CLongRealLongDoublePPC64LE): Remove. (m2configure_TargetIEEEQuadDefault): New function. * gm2-gcc/m2configure.def (M2CLongRealFloat128): Remove. (M2CLongRealIBM128): Remove. (M2CLongRealLongDouble): Remove. (M2CLongRealLongDoublePPC64LE): Remove. (TargetIEEEQuadDefault): New function. * gm2-gcc/m2configure.h (m2configure_M2CLongRealFloat128): Remove. (m2configure_M2CLongRealIBM128): Remove. (m2configure_M2CLongRealLongDouble): Remove. (m2configure_M2CLongRealLongDoublePPC64LE): Remove. (m2configure_TargetIEEEQuadDefault): New function. * gm2-gcc/m2options.h (M2Options_SetIBMLongDouble): New prototype. (M2Options_GetIBMLongDouble): New prototype. (M2Options_SetIEEELongDouble): New prototype. (M2Options_GetIEEELongDouble): New prototype. * gm2-gcc/m2type.cc (build_m2_long_real_node): Re-implement using results of M2Options_GetIBMLongDouble and M2Options_GetIEEELongDouble. * gm2-lang.cc (gm2_langhook_handle_option): Add case OPT_mabi_ibmlongdouble and call M2Options_SetIBMLongDouble. Add case OPT_mabi_ieeelongdouble and call M2Options_SetIEEELongDouble. * gm2config.aci.in: Regenerate. * gm2spec.cc (lang_specific_driver): Remove block defined by M2C_LONGREAL_PPC64LE. Remove case OPT_mabi_ibmlongdouble. Remove case OPT_mabi_ieeelongdouble. libgm2/ChangeLog: PR modula2/111956 * Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * Makefile.in: Regenerate. * libm2cor/Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * libm2cor/Makefile.in: Regenerate. * libm2iso/Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * libm2iso/Makefile.in: Regenerate. * libm2log/Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * libm2log/Makefile.in: Regenerate. * libm2min/Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * libm2min/Makefile.in: Regenerate. * libm2pim/Makefile.am (TARGET_LONGDOUBLE_ABI): Remove. * libm2pim/Makefile.in: Regenerate. --- 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. */ - -bool -m2configure_M2CLongRealFloat128 (void) -{ -#if defined(M2C_LONGREAL_FLOAT128) - return true; -#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. */ +/* 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_M2CLongRealLongDoublePPC64LE (void) +int +m2configure_TargetIEEEQuadDefault (void) { -#if defined(M2C_LONGREAL_PPC64LE) - return true; +#ifdef TARGET_IEEEQUAD_DEFAULT + return TARGET_IEEEQUAD_DEFAULT; #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)