amd64/115784: Compiling with -m32 breaks on FreeBSD/amd64
Rene Gollent
rgollent at cs.arizona.edu
Fri Aug 24 07:30:01 PDT 2007
>Number: 115784
>Category: amd64
>Synopsis: Compiling with -m32 breaks on FreeBSD/amd64
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: freebsd-amd64
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Aug 24 14:30:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Rene Gollent
>Release: FreeBSD 7.0-CURRENT-200708 #0: Fri Aug 17 04:42:11 UTC 2007
>Organization:
>Environment:
FreeBSD leviathan.boldlygoingnowhere.org 7.0-CURRENT-200708 FreeBSD 7.0-CURRENT-200708 #0: Fri Aug 17 04:42:11 UTC 2007 root at myers.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
If you attempt to compile with gcc -m32 on the above platform, the following issues occur:
1) if you #include <new>, compilation fails with the following errors:
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:95: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:96: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:99: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:100: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:105: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
/usr/include/c++/4.2/new:106: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter
If not including new or another problem header, linking fails:
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for -lgcc
/usr/bin/ld: cannot find -lgcc
>How-To-Repeat:
Attempt to compile the following code:
#include <new>
int main(int, char **)
{
char *blah = new char[5];
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-amd64
mailing list