This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/42994] Status of using both -m32 and -m64 on the same command line



------- Comment #2 from rguenther at suse dot de  2010-02-07 22:09 -------
Subject: Re:   New: Status of using both -m32 and -m64 on
 the same command line

On Sun, 7 Feb 2010, jengelh at medozas dot de wrote:

> I noticed that combining -m32 and -m64 has different effects on different
> platforms.
> 
> On sparc64:
> 20:06 ares:../libhugetlbfs/libhugetlbfs-2.0 > gcc -c -m32 -m64 x.c
> gcc: may not use both -m32 and -m64
> 
> On x86_64:
> 20:11 borg:~/obs > >x.c
> 20:11 borg:~/obs > gcc -c -m32 -m64 x.c
> (no error)
> 
> I think that this behavior should be unified across gcc's supported arches, and
> I would opt for not allowing both -m32 and -m64, to detect flawed packages
> (like libhugetlbfs in this case) that manually add -m64 - perhaps even in the
> wrong place - based upon their arch detection heuristic (which is generally not
> accurate).
> 
> The particular example point in case is rpmbuilding on SUSE where RPM_OPT_FLAGS
> carries -m32 (this is correct) and libhugetlbfs's Makefile statically adds -m64
> (this is incorrect). This error has not popped up earlier since combining -m32
> and -m64 is unfortunately permitted on x86.

It's never correct for RPM_OPT_FLAGS to add either -m32 or -m64.

Richard.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42994


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]