From: Paolo Bonzini <bonzini@gnu.org>
To: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Cc: gcc-patches@gcc.gnu.org,
"Joseph S. Myers" <joseph@codesourcery.com>,
Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
Mike Stump <mikestump@comcast.net>,
"Loren J. Rittle" <ljrittle@acm.org>,
Kai Tietz <ktietz@redhat.com>,
Dave Korn <dave.korn.cygwin@gmail.com>,
Jason Thorpe <thorpej@netbsd.org>,
Krister Walfridsson <krister.walfridsson@gmail.com>,
Uros Bizjak <ubizjak@gmail.com>,
Richard Henderson <rth@redhat.com>,
Eric Botcazou <ebotcazou@adacore.com>
Subject: Re: [build] Move ENABLE_EXECUTE_STACK to toplevel libgcc
Date: Tue, 31 May 2011 09:45:00 -0000 [thread overview]
Message-ID: <4DE4AEC2.3030502@gnu.org> (raw)
In-Reply-To: <yddipssrxgx.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
On 05/30/2011 05:59 PM, Rainer Orth wrote:
> This is my hopefully last patch for toplevel libgcc moves: it moves
> ENABLE_EXECUTE_STACK to $target-lib.h headers in libgcc/config. Since
> gcc/config/sol2.h is only used on Solaris targets anymore and Solaris 8
> is the minimal supported version, I've removed both a Solaris 2.6
> workaround and include<sys/mman.h> directly. Same thing in osf5-lib.h.
>
> Since the existance of the macro is used in alpha/alpha.c, i386/i386.c,
> and sparc/sparc.c to enable calls to __enable_execute_stack, I had to
> define HAVE_ENABLE_EXECUTE_STACK in the gcc/config headers to convey the
> necessary information.
>
> The new libgcc/config/$target-lib.h headers are added to libgcc_tm_file
> in gcc/config.gcc. I'd rather add them to libgcc/config.host instead so
> the information is kept local to libgcc.
Did you have any problems doing so?
Long term, it would be even better to do something like this in
libgcc/config.host:
enable_execute_stack=enable-execute-stack-empty.c
case $host in
...) enable_execute_stack=config/enable-execute-stack-mprotect.c ;;
...
esac
in libgcc/configure.ac:
AC_CONFIG_LINKS(enable-execute-stack.c:$enable_execute_stack)
in libgcc/Makefile.in:
LIB2ADD += enable-execute-stack.c
and drop this hunk altogether from gcc/libgcc2.c:
#ifdef L_enable_execute_stack
/* Attempt to turn on execute permission for the stack. */
#ifdef ENABLE_EXECUTE_STACK
ENABLE_EXECUTE_STACK
#else
void
__enable_execute_stack (void *addr __attribute__((__unused__)))
{}
#endif /* ENABLE_EXECUTE_STACK */
#endif /* L_enable_execute_stack */
> Bootstrapped without regressions on i386-pc-solaris2.11 and
> sparc-sun-solaris2.11.
>
> I've Cc'ed the OS port maintainers of the other affected targets and
> would appreciate testing/review. An OpenBSD maintainer isn't listed,
> unfortunately. Also included are the CPU port maintainers for the
> modified backends.
>
> Ok for mainline after a week if no problems occur in testing on the
> other targets?
It's a good start, but at least you need changes to the documentation;
if you can make the above work, that would be great as an example of how
to move stuff to the libgcc toplevel directory.
Paolo
next prev parent reply other threads:[~2011-05-31 9:03 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-30 18:09 Rainer Orth
2011-05-30 20:09 ` Kai Tietz
2011-05-31 9:45 ` Paolo Bonzini [this message]
2011-05-31 16:40 ` Rainer Orth
2011-05-31 16:57 ` Paolo Bonzini
2011-06-03 15:45 ` Rainer Orth
2011-06-03 16:01 ` Paolo Bonzini
2011-06-06 9:18 ` Rainer Orth
2011-06-06 9:23 ` Paolo Bonzini
2011-06-07 15:20 ` Joseph S. Myers
2011-06-07 15:31 ` Rainer Orth
2011-06-07 15:45 ` Paolo Bonzini
2011-06-07 19:17 ` Joseph S. Myers
2011-06-09 7:50 ` Rainer Orth
2011-06-09 9:57 ` Joseph S. Myers
2011-06-09 12:06 ` Bernd Schmidt
2011-06-04 11:00 ` Gerald Pfeifer
2011-06-04 11:17 ` Andreas Schwab
2011-06-07 14:00 ` Joseph S. Myers
2011-06-07 14:57 ` Rainer Orth
2011-05-31 18:11 ` Mike Stump
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4DE4AEC2.3030502@gnu.org \
--to=bonzini@gnu.org \
--cc=Ralf.Wildenhues@gmx.de \
--cc=dave.korn.cygwin@gmail.com \
--cc=ebotcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=krister.walfridsson@gmail.com \
--cc=ktietz@redhat.com \
--cc=ljrittle@acm.org \
--cc=mikestump@comcast.net \
--cc=ro@CeBiTec.Uni-Bielefeld.DE \
--cc=rth@redhat.com \
--cc=thorpej@netbsd.org \
--cc=ubizjak@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).