[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#594138: marked as done ([sparc] g++ generates 32-bit binaries while gcc generates 64-bit ones)



Your message dated Fri, 02 Aug 2013 13:19:50 +0200
with message-id <2273892.uXm4dNHcxH@amadeus>
and subject line [sparc] g++ generates 32-bit binaries while gcc generates 64-bit ones
has caused the Debian Bug report #594138,
regarding [sparc] g++ generates 32-bit binaries while gcc generates 64-bit ones
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
594138: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594138
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: g++-4.4
Version: 4.4.4-9
Severity: normal

As specified in the subject line, on an UltraSPARC (sparc64), g++
generates 32-bit binaries by default while gcc generates 64-bit binaries
by default.  This is not only bizarre, but it makes the traditional
instructions to link combinations of C and C++ with g++ difficult.

My objection is not to generating one or the other (although it would be
nice to generate sparc64 binaries automatically if the machine is
sparc64) but that gcc and g++ behave differently.  foo.c is basically
the source to /bin/true.

  blackhole ok % make        
  ls -l
  total 16
  lrwxrwxrwx 1 bmc bmc   5 Aug 23 21:58 bar.cc -> foo.c
  -rw-r--r-- 1 bmc bmc  30 Aug 23 21:58 foo.c
  -rw-r--r-- 1 bmc bmc 191 Aug 23 22:24 Makefile
  uname -a
  Linux blackhole 2.6.32-5-sparc64 #1 Sat Jul 24 04:11:04 UTC 2010 sparc64 GNU/Linux
  dpkg -l gcc-multilib g++-multilib
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name                          Version                       Description
  +++-=============================-=============================-==========================================================================
  ii  g++-multilib                  4:4.4.4-2                     The GNU C++ compiler (multilib files)
  ii  gcc-multilib                  4:4.4.4-2                     The GNU C compiler (multilib files)
  cc     foo.c   -o foo
  g++     bar.cc   -o bar
  cc    -c -o foo.o foo.c
  g++ -o baz foo.o
  /usr/bin/ld: sparc:v9 architecture of input file `foo.o' is incompatible with sparc:v8plus output
  collect2: ld returned 1 exit status
  make: [baz] Error 1 (ignored)
  file foo bar baz
  foo: ELF 64-bit MSB executable, SPARC V9, relaxed memory ordering, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
  bar: ELF 32-bit MSB executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
  baz: ERROR: cannot open `baz' (No such file or directory)
  make: *** [file] Error 1

The system information has been elided because this was filed from a
different box.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187

Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Version: 4.4.7-4

¡Hola!

It seems that this issue is fixed in one of the updates made in the last 3 
years. :)

$ uname -a
Linux smetana 2.6.32-5-sparc64-smp #1 SMP Mon Feb 25 02:19:08 UTC 2013 sparc 
GNU/Linux
--  t.c --
int main() { return 0; }
----
$ gcc -Wall t.c -o t
$ g++ -Wall t.c -o u
$ file t u
t: ELF 32-bit MSB  executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
BuildID[sha1]=e968455e104c45bf4df71a2935a5f5ae398d6a2b, not stripped
u: ELF 32-bit MSB  executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
BuildID[sha1]=12216144b68f44e0e4963b37a8c209fab38942b3, not stripped

$ gcc-4.4 -Wall t.c -o v
$ g++-4.4 -Wall t.c -o w
$ file v w
v: ELF 32-bit MSB  executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
BuildID[sha1]=7803840a0708c8bf64dd8f4dedabc2c81629fb5c, not stripped
w: ELF 32-bit MSB  executable, SPARC32PLUS, V8+ Required, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.32, 
BuildID[sha1]=ae561126d713b461cff38347dbfe2c7a06bc8ee4, not stripped

Thus, I'm closing this bug. Please feel free to reopen the issue if you can 
still reproduce it.

Thanks
-- 
"Can you imagine what I would do if I could do all I can?" -- Sun Tzu
Saludos /\/\ /\ >< `/

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply to: