From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23208 invoked by alias); 3 Apr 2003 10:26:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 23137 invoked by uid 71); 3 Apr 2003 10:26:01 -0000 Date: Thu, 03 Apr 2003 10:26:00 -0000 Message-ID: <20030403102601.23136.qmail@sources.redhat.com> To: jakub@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Nick Clifton Subject: Re: c/8022: gcc 3.2 Solaris 64 bit shared libraries Reply-To: Nick Clifton X-SW-Source: 2003-04/txt/msg00087.txt.bz2 List-Id: The following reply was made to PR target/8022; it has been noted by GNATS. From: Nick Clifton To: hyc@symas.com, jsurveyor@macquarie.net.au Cc: gcc-patches@gcc.gnu.org, gcc-gnats@gcc.gnu.org Subject: Re: c/8022: gcc 3.2 Solaris 64 bit shared libraries Date: 03 Apr 2003 11:20:21 +0100 Hi Hyc, Hi John > 64 bit binaries produced by gcc 3.x "-m64" option and compiled by > gas are unusable for shared libraries, by default. The gas --help > says "-TSO" is the default but it actually defaults to > "-RMO". /usr/ccs/bin/ld will link the object files without any > complaint, but the runtime linker barfs. This issue was first > reported on > > http://gcc.gnu.org/ml/gcc-help/2002-06/msg00005.html > > Adding "-TSO" to the specs file for the appropriate -m64 clauses > fixes the problem. I am applying this patch, approved by Jakub in a private email, to fix the problem. With the patch applied, the specs file looks like this: *asm_cpu: %{mcpu=ultrasparc:%{!m64:-xarch=v8plusa}%{m64:-xarch=v9a -TSO}} %{mcpu=v9:%{!m64:-xarch=v8plus}%{m64:-xarch=v9 -TSO}} %{!mcpu=ultrasparc:%{!mcpu=v9:%{mcpu*:%{!m64:-xarch=v8}%{m64:-xarch=v9 -TSO}}}} %{!mcpu*:%(asm_cpu_default)} *asm_cpu_default: %{m64:-xarch=v9 -TSO} %{!m64:} Cheers Nick 2003-04-03 Nick Clifton * config/sparc/sol2-bi.h (ASM_CPU64_DEFAULT_SPEC): Add -TSO. (DEF_ARCH64_SPEC): Likewise. Index: gcc/config/sparc/sol2-bi.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/sparc/sol2-bi.h,v retrieving revision 1.8 diff -c -3 -p -w -r1.8 sol2-bi.h *** gcc/config/sparc/sol2-bi.h 3 Oct 2002 20:35:14 -0000 1.8 --- gcc/config/sparc/sol2-bi.h 3 Apr 2003 10:12:15 -0000 *************** *** 10,16 **** #undef ASM_CPU32_DEFAULT_SPEC #define ASM_CPU32_DEFAULT_SPEC "" #undef ASM_CPU64_DEFAULT_SPEC ! #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 #undef CPP_CPU64_DEFAULT_SPEC --- 10,16 ---- #undef ASM_CPU32_DEFAULT_SPEC #define ASM_CPU32_DEFAULT_SPEC "" #undef ASM_CPU64_DEFAULT_SPEC ! #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG " -TSO" #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 #undef CPP_CPU64_DEFAULT_SPEC *************** *** 24,38 **** #undef ASM_CPU32_DEFAULT_SPEC #define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusa" #undef ASM_CPU64_DEFAULT_SPEC ! #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a" #endif #if DEFAULT_ARCH32_P #define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}" ! #define DEF_ARCH64_SPEC(__str) "%{m64:" __str "}" #else #define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}" ! #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str "}" #endif #undef CPP_CPU_SPEC --- 24,38 ---- #undef ASM_CPU32_DEFAULT_SPEC #define ASM_CPU32_DEFAULT_SPEC "-xarch=v8plusa" #undef ASM_CPU64_DEFAULT_SPEC ! #define ASM_CPU64_DEFAULT_SPEC AS_SPARC64_FLAG "a -TSO" #endif #if DEFAULT_ARCH32_P #define DEF_ARCH32_SPEC(__str) "%{!m64:" __str "}" ! #define DEF_ARCH64_SPEC(__str) "%{m64:" __str " -TSO}" #else #define DEF_ARCH32_SPEC(__str) "%{m32:" __str "}" ! #define DEF_ARCH64_SPEC(__str) "%{!m32:" __str " -TSO}" #endif #undef CPP_CPU_SPEC