Bug 2202 - Add "-m64" to build frysk as 64-bits binary on ppc64?
Summary: Add "-m64" to build frysk as 64-bits binary on ppc64?
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Andrew Cagney
Depends on:
Blocks: 2004 2188 2203 2204 2219
  Show dependency treegraph
Reported: 2006-01-25 06:00 UTC by Wu Zhou
Modified: 2006-01-27 07:19 UTC (History)
1 user (show)

See Also:
Host: powerpc-redhat-linux-gnu
Target: powerpc64-redhat-linux-gnu
Build: powerpc-redhat-linux-gnu
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Wu Zhou 2006-01-25 06:00:22 UTC
If no "-m64" option is added, gnu compilers will run in 32-bits model by default.  

PPC64 is a bi-arch.  So I think it is also desirable for frysk to be built as
64-bits and can handle 32-bits and 64-bits application at the same time.  What
is your point?  Thanks.

The fix is simple, use this in frysk.spec (EXPORT):

        local p=%{frysk_gcc_prefix}
        local s=%{frysk_gcc_suffix}
%ifarch ppc64
        local c=" -mminimal-toc -m64"
        local c=""

BTW, what is the situation in x86-64?  Does it build in 64-bits model by default?
Comment 1 Wu Zhou 2006-01-25 06:53:42 UTC
BTW.  with "-m64", the internal compiler error we discussed before can be worked

I mentioned this in http://sourceware.org/ml/frysk/2006-q1/msg00026.html:

I made a test with the 20060106 snapshot of gcc-4.1, it still failed.  
Janis Johnson also confirmed that it failed in the same way on GCC trunk, 
gcc-3.4.2 building in 32-bits mode, with "-m64" option however, it will 
report only an undefined reference:

/tmp/ccggTln9.o(.toc+0x10): undefined reference to `cniinner::child::class$'
collect2: ld returned 1 exit status
Comment 2 Andrew Cagney 2006-01-26 15:57:39 UTC

* Thu Jan 26 2006 Andrew Cagney <cagney@redhat.com>
- From Wu Zhou <woodzltc@cn.ibm.com>: Add -m64 to ppc64 CC et.al.