2007-05-05 16:32:17

by Dennis Gilmore

[permalink] [raw]
Subject: PATCH: use CFLAGS when linking always

for multilib archs default CFLAGS may be inappropriate and reslut in binaries
unable to be linked. since e2fsprogs uses gcc for linking I noticed this
while building for sparc64. patch has been tested and applied in Aurora
SPARC Linux.

Please CC me on responses.

Dennis


Attachments:
(No filename) (0.00 B)
(No filename) (189.00 B)
Download all attachments

2007-05-05 19:26:50

by Theodore Ts'o

[permalink] [raw]
Subject: Re: PATCH: use CFLAGS when linking always

On Sat, May 05, 2007 at 09:20:47AM -0500, Dennis Gilmore wrote:
> for multilib archs default CFLAGS may be inappropriate and reslut in binaries
> unable to be linked. since e2fsprogs uses gcc for linking I noticed this
> while building for sparc64. patch has been tested and applied in Aurora
> SPARC Linux.

What options do you need, and why don't you just specify them via:

configure --with-ldopts="--foo-ld-flag"

- Ted

2007-05-06 03:06:21

by Dennis Gilmore

[permalink] [raw]
Subject: Re: PATCH: use CFLAGS when linking always

Once upon a time Saturday 05 May 2007, Theodore Tso wrote:
> On Sat, May 05, 2007 at 09:20:47AM -0500, Dennis Gilmore wrote:
> > for multilib archs default CFLAGS may be inappropriate and reslut in
> > binaries unable to be linked. since e2fsprogs uses gcc for linking I
> > noticed this while building for sparc64. patch has been tested and
> > applied in Aurora SPARC Linux.
>
> What options do you need, and why don't you just specify them via:
>
> configure --with-ldopts="--foo-ld-flag"
>
> - Ted

defaults on sparc64 result in 64 bit objects but gcc trying to create a 32
bit binary. as a result the build blows up horribly. the patch ensures that
CFLAGS is used in linking. since gcc is used to link it is needed.

Dennis


Attachments:
(No filename) (744.00 B)
(No filename) (189.00 B)
Download all attachments

2007-05-06 13:54:38

by Theodore Ts'o

[permalink] [raw]
Subject: Re: PATCH: use CFLAGS when linking always

On Sat, May 05, 2007 at 10:06:01PM -0500, Dennis Gilmore wrote:
> Once upon a time Saturday 05 May 2007, Theodore Tso wrote:
> > On Sat, May 05, 2007 at 09:20:47AM -0500, Dennis Gilmore wrote:
> > > for multilib archs default CFLAGS may be inappropriate and reslut in
> > > binaries unable to be linked. since e2fsprogs uses gcc for linking I
> > > noticed this while building for sparc64. patch has been tested and
> > > applied in Aurora SPARC Linux.
> >
> > What options do you need, and why don't you just specify them via:
> >
> > configure --with-ldopts="--foo-ld-flag"
> >
> > - Ted
>
> defaults on sparc64 result in 64 bit objects but gcc trying to create a 32
> bit binary. as a result the build blows up horribly. the patch ensures that
> CFLAGS is used in linking. since gcc is used to link it is needed.
>

What CFLAGS are you passing to configure, exactly? And why can't you
also pass them to configure via --with-ldopts?

- Ted