FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 11-11-2008, 02:21 PM
"Jerry James"
 
Default Filtering -fstack-protector out of CFLAGS

GCL will not run successfully if compiled with -fstack-protector.* It has its own internal stack management code that interacts badly with -fstack-protector.* So I decided to try filtering that option out of the default CFLAGS.* I put this at the top of the GCL spec file:

%global __global_cflags %{echo %__global_cflags | %{__sed} 's/ -fstack-protector//'}

That seems to work, in that %configure passes RPM_OPT_FLAGS minus -fstack-protector, but when I run rpmbuild, I see:


echoechoechoechoechoechoechoechoExecuting(%prep): ...

What's with the 8 "echo" strings, one right after the other?* Is that something I should worry about?* Am I filtering CFLAGS the right way?* Do I need to get explicit permission from some group to do this?* Thanks,

--
Jerry James
http://loganjerry.googlepages.com/


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 03:17 PM
Adam Jackson
 
Default Filtering -fstack-protector out of CFLAGS

On Tue, 2008-11-11 at 08:21 -0700, Jerry James wrote:
> GCL will not run successfully if compiled with -fstack-protector. It
> has its own internal stack management code that interacts badly with
> -fstack-protector. So I decided to try filtering that option out of
> the default CFLAGS. I put this at the top of the GCL spec file:
>
> %global __global_cflags %{echo %__global_cflags | %{__sed} 's/
> -fstack-protector//'}
>
> That seems to work, in that %configure passes RPM_OPT_FLAGS minus
> -fstack-protector, but when I run rpmbuild, I see:
>
> echoechoechoechoechoechoechoechoExecuting(%prep): ...
>
> What's with the 8 "echo" strings, one right after the other? Is that
> something I should worry about? Am I filtering CFLAGS the right way?
> Do I need to get explicit permission from some group to do this?
> Thanks,

In the X server, I do:

export CFLAGS="${RPM_OPT_FLAGS} -Wstrict-overflow -rdynamic $CFLAGS"
%configure --enable-maintainer-mode %{xservers}
# ...

Which seems to work fine.

- ajax
--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 03:42 PM
"Richard W.M. Jones"
 
Default Filtering -fstack-protector out of CFLAGS

On Tue, Nov 11, 2008 at 08:21:12AM -0700, Jerry James wrote:
> GCL will not run successfully if compiled with -fstack-protector. It has
> its own internal stack management code that interacts badly with
> -fstack-protector. So I decided to try filtering that option out of the
> default CFLAGS. I put this at the top of the GCL spec file:

We used to do something like this for the MinGW packages, since
-fstack-protector also causes a problem under Windows / MinGW
cross-compilation:

CFLAGS="$RPM_OPT_FLAGS -fno-stack-protector"
./configure [etc]

(example: http://hg.et.redhat.com/misc/fedora-mingw--devel/?fd=136ab7f25dc2;file=gnutls/mingw-gnutls.spec )

I should hasten to add that we don't do that any more, because we
defined our own %{_mingw32_cflags} macro so we'd have finer control.

Also, if anyone can fix -fstack-protector on Windows / MinGW, please
help!

Rich.

--
Richard Jones, Emerging Technologies, Red Hat http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 04:06 PM
Ralf Corsepius
 
Default Filtering -fstack-protector out of CFLAGS

On Tue, 2008-11-11 at 11:17 -0500, Adam Jackson wrote:
> On Tue, 2008-11-11 at 08:21 -0700, Jerry James wrote:
> > GCL will not run successfully if compiled with -fstack-protector. It
> > has its own internal stack management code that interacts badly with
> > -fstack-protector. So I decided to try filtering that option out of
> > the default CFLAGS. I put this at the top of the GCL spec file:
> >
> > %global __global_cflags %{echo %__global_cflags | %{__sed} 's/
> > -fstack-protector//'}
> >
> > That seems to work, in that %configure passes RPM_OPT_FLAGS minus
> > -fstack-protector, but when I run rpmbuild, I see:
> >
> > echoechoechoechoechoechoechoechoExecuting(%prep): ...
> >
> > What's with the 8 "echo" strings, one right after the other? Is that
> > something I should worry about? Am I filtering CFLAGS the right way?
> > Do I need to get explicit permission from some group to do this?
> > Thanks,
>
> In the X server, I do:
>
> export CFLAGS="${RPM_OPT_FLAGS} -Wstrict-overflow -rdynamic $CFLAGS"
> %configure --enable-maintainer-mode %{xservers}
> # ...
>
> Which seems to work fine.
With modern configure scripts you can pass CFLAGS to configure directly
instead of resorting to using the environment.

Ralf


--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 
Old 11-11-2008, 08:24 PM
"Jerry James"
 
Default Filtering -fstack-protector out of CFLAGS

On Tue, Nov 11, 2008 at 9:42 AM, Richard W.M. Jones <rjones@redhat.com> wrote:
> We used to do something like this for the MinGW packages, since
> -fstack-protector also causes a problem under Windows / MinGW
> cross-compilation:
>
> CFLAGS="$RPM_OPT_FLAGS -fno-stack-protector"
> ./configure [etc]

I've adopted this approach. Thank you. Thanks also to Ajax and Ralf
for their replies.
--
Jerry James
http://loganjerry.googlepages.com/

--
fedora-devel-list mailing list
fedora-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-devel-list
 

Thread Tools




All times are GMT. The time now is 02:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org