Find a file
H.J. Lu 428b381275 Add --enable-default-pie option to GCC configure
Add --enable-default-pie option to configure GCC to generate PIE by
default.

gcc/

	* Makefile.in (COMPILER): Add @NO_PIE_CFLAGS@.
	(BUILD_CFLAGS): Likewise.
	(BUILD_CXXFLAGS): Likewise.
	(LINKER): Add @NO_PIE_FLAG@.
	(BUILD_LDFLAGS): Likewise.
	(libgcc.mvars): Set NO_PIE_CFLAGS to -fno-PIE for
	--enable-default-pie.
	* common.opt (fPIE): Initialize to -1.
	(fpie): Likewise.
	(no-pie): New option.
	(pie): Replace "Negative(shared)" with "Negative(no-pie)".
	* configure.ac: Add --enable-default-pie.
	(NO_PIE_CFLAGS): New.  Check if -fno-PIE works.  AC_SUBST.
	(NO_PIE_FLAG): New.  Check if -no-pie works.  AC_SUBST.
	* defaults.h (DEFAULT_FLAG_PIE): New.  Default PIE to -fPIE.
	* gcc.c (NO_PIE_SPEC): New.
	(PIE_SPEC): Likewise.
	(NO_FPIE1_SPEC): Likewise.
	(FPIE1_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE2_SPEC): Likewise.
	(NO_FPIE2_SPEC): Likewise.
	(FPIE_SPEC): Likewise.
	(NO_FPIE_SPEC): Likewise.
	(NO_FPIC1_SPEC): Likewise.
	(FPIC1_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC2_SPEC): Likewise.
	(NO_FPIC2_SPEC): Likewise.
	(FPIC_SPEC): Likewise.
	(NO_FPIC_SPEC): Likewise.
	(NO_FPIE1_AND_FPIC1_SPEC): Likewise.
	(FPIE1_OR_FPIC1_SPEC): Likewise.
	(NO_FPIE2_AND_FPIC2_SPEC): Likewise.
	(FPIE2_OR_FPIC2_SPEC): Likewise.
	(NO_FPIE_AND_FPIC_SPEC): Likewise.
	(FPIE_OR_FPIC_SPEC): Likewise.
	(LD_PIE_SPEC): Likewise.
	(LINK_PIE_SPEC): Handle -no-pie.  Use PIE_SPEC and LD_PIE_SPEC.
	* opts.c (finish_options): Update opts->x_flag_pie if it is -1.
	* config/darwin.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	(LINK_SPEC): Replace PIE_SPEC with DARWIN_PIE_SPEC.
	* config/darwin9.h (PIE_SPEC): Renamed to ...
	(DARWIN_PIE_SPEC): This.
	* config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
	PIE_SPEC and NO_PIE_SPEC if HAVE_LD_PIE is defined.
	* config/openbsd.h (ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and
	FPIE2_OR_FPIC2_SPEC.
	* config/m68k/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/m68k/openbsd.h (ASM_SPEC): Likewise.
	* gcc/config/sol2.h (ASM_PIC_SPEC): Likewise.
	* config/arm/freebsd.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/netbsd-elf.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/arm/semi.h (SUBTARGET_EXTRA_ASM_SPEC): Likewise.
	* config/cris/linux.h (CRIS_ASM_SUBTARGET_SPEC): Likewise.
	* config/m32r/m32r.h (ASM_SPEC): Likewise.
	* config/m68k/uclinux.h (DRIVER_SELF_SPECS): Likewise.
	* config/rs6000/linux64.h (ASM_SPEC32): Likewise.
	* config/rs6000/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/freebsd.h (ASM_SPEC): Likewise.
	* config/sparc/linux.h (ASM_SPEC): Likewise.
	* config/sparc/linux64.h (ASM_SPEC): Likewise.
	* config/sparc/netbsd-elf.h (ASM_SPEC): Likewise.
	* config/sparc/openbsd64.h (ASM_SPEC): Likewise.
	* config/sparc/sp-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sp64-elf.h (ASM_SPEC): Likewise.
	* config/sparc/sparc.h (ASM_SPEC): Likewise.
	* config/sparc/sysv4.h (ASM_SPEC): Likewise.
	* config/sparc/vxworks.h (ASM_SPEC): Likewise.
	* config/c6x/elf-common.h (ASM_SPEC): Use NO_FPIC2_SPEC,
	FPIC2_SPEC, FPIC1_SPEC and FPIC2_SPEC.
	* config/c6x/uclinux-elf.h (LINK_SPEC): Use FPIE_SPEC.
	* config/frv/frv.h (DRIVER_SELF_SPECS): Use FPIC_SPEC,
	NO_FPIC_SPEC and NO_FPIE1_AND_FPIC1_SPEC.
	(ASM_SPEC): Use FPIE1_OR_FPIC1_SPEC and FPIE2_OR_FPIC2_SPEC.
	* config/m68k/m68k.h (ASM_PCREL_SPEC): Use FPIC_SPEC and
	NO_FPIC_SPEC.
	* config/mips/gnu-user.h (NO_SHARED_SPECS): Use
	NO_FPIE_AND_FPIC_SPEC.
	* config/mips/vxworks.h (SUBTARGET_ASM_SPEC): Use FPIC_SPEC.
	* config/rs6000/freebsd64.h (ASM_SPEC32): Likewise.
	* config/rs6000/vxworks.h (ASM_SPEC): Likewise.
	* config/vax/linux.h (ASM_SPEC): Likewise.
	* doc/install.texi: Document --enable-default-pie.
	* doc/invoke.texi: Document -no-pie.
	* config.in: Regenerated.
	* configure: Likewise.

gcc/ada/

	* gcc-interface/Makefile.in (TOOLS_LIBS): Add @NO_PIE_FLAG@.

libgcc/

	* Makefile.in (CRTSTUFF_CFLAGS): Add $(NO_PIE_CFLAGS).

From-SVN: r223796
2015-05-27 19:36:55 -07:00
boehm-gc boehm-gc: Bump to automake 1.11.6 2015-05-13 10:56:33 +00:00
config * warnings.m4: Fix comment. 2015-05-27 16:40:38 -04:00
contrib check_GNU_style.sh: Don't do 80 char check line by line 2015-05-18 15:44:55 +00:00
fixincludes inclhack.def (aix_externc): New fix. 2015-05-21 13:25:00 -04:00
gcc Add --enable-default-pie option to GCC configure 2015-05-27 19:36:55 -07:00
gnattools Makefile.in (TOOLS_FLAGS_TO_PASS_CROSS): Robustify. 2014-02-23 16:30:11 +00:00
gotools gotools: Bump to automake 1.11.6 2015-05-13 10:59:14 +00:00
include libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined. 2015-05-22 20:53:45 +00:00
INSTALL README: Do not mention CVS. 2014-10-12 15:05:28 +00:00
intl intl: Bump to automake 1.11.6 2015-05-13 10:37:11 +00:00
libada re PR target/65351 (libiberty's pic version contains non-pic code on m32 darwin; causes bootstrap fail building libcc1.) 2015-04-10 06:43:52 +00:00
libatomic Avoid misaligned atomic operations 2015-01-21 09:17:03 -08:00
libbacktrace libbacktrace: Bump to automake 1.11.6 2015-05-13 10:58:11 +00:00
libcc1 libcc1: Bump to automake 1.11.6 2015-05-13 11:00:37 +00:00
libcilkrts libcilkrts: Bump to automake 1.11.6 2015-05-13 11:01:24 +00:00
libcpp line-map.c (LINE_MAP_MAX_COLUMN_NUMBER LINE_MAP_MAX_LOCATION_WITH_COLS,LINE_MAP_MAX_SOURCE_LOCATION): New constants. 2015-05-26 17:12:28 +00:00
libdecnumber libdecnumber: Bump to automake 1.11.6 2015-05-13 11:02:59 +00:00
libffi libffi: Bump to automake 1.11.6 2015-05-13 11:23:24 +00:00
libgcc Add --enable-default-pie option to GCC configure 2015-05-27 19:36:55 -07:00
libgfortran libstdc++, libgfortran gthr workaround for musl 2015-04-22 14:24:11 +00:00
libgo libgo: Use __USING_SJLJ_EXCEPTIONS__ rather than configure test. 2015-05-16 00:17:46 +00:00
libgomp wait.h (gomp_futex_wait, [...]): Declare as int. 2015-05-27 23:07:09 +02:00
libiberty libiberty.h (asprintf): Don't declare if HAVE_DECL_ASPRINTF is not defined. 2015-05-22 20:53:45 +00:00
libitm futex.h (sys_futex0): Change operand "op" to long. 2015-05-27 21:35:58 +02:00
libjava jni.exp (gcj_jni_get_cxxflags_invocation): Add libiconv for FreeBSD to cxxflags. 2015-05-26 20:31:49 +02:00
libmpx libmpx: Bump to automake 1.11.6 2015-05-13 11:26:12 +00:00
libobjc sjlj.m4: New file. 2015-05-13 21:15:31 +00:00
liboffloadmic liboffloadmic: Bump to automake 1.11.6 2015-05-13 11:10:33 +00:00
libquadmath libquadmath: Bump to automake 1.11.6 2015-05-13 11:27:43 +00:00
libsanitizer libsanitizer: Bump to automake 1.11.6 2015-05-13 11:11:58 +00:00
libssp libssp: Bump to automake 1.11.6 2015-05-13 11:12:39 +00:00
libstdc++-v3 stl_tree.h (_Rb_tree::_M_end()): Return _Base_ptr instead of downcasting. 2015-05-27 12:18:44 +01:00
libvtv libvtv: Bump to automake 1.11.6 2015-05-13 11:28:41 +00:00
lto-plugin lto-plugin: Bump to automake 1.11.6 2015-05-13 11:30:22 +00:00
maintainer-scripts update_version_svn: Update DATESTAMP also on branches/gcc-[0-9]+-branch. 2015-04-13 11:07:11 +02:00
zlib zlib: Bump to automake 1.11.6 2015-05-13 11:31:32 +00:00
.dir-locals.el
.gitignore Local Vim config with GNU formatting. 2014-12-09 13:45:47 +00:00
ABOUT-NLS
ChangeLog configure.ac: When bootstrapping with GCC, add -std=c++98 to CXX. 2015-05-26 08:29:13 -04:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
ChangeLog.tree-ssa
compile Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
config-ml.in * config-ml.in: Robustify ac_configure_args parsing. 2014-06-13 16:32:29 +02:00
config.guess config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
config.rpath
config.sub config.sub: Update from upstream, to 2015-01-01 version. 2015-01-02 09:30:21 +00:00
configure configure.ac: When bootstrapping with GCC, add -std=c++98 to CXX. 2015-05-26 08:29:13 -04:00
configure.ac configure.ac: When bootstrapping with GCC, add -std=c++98 to CXX. 2015-05-26 08:29:13 -04:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
install-sh Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
libtool-ldflags re PR sanitizer/56781 (boostrap-asan failure: fixincl fails to link (missing -lasan)) 2014-04-17 14:23:28 +02:00
libtool.m4 Always use PIC option with -shared in libtool 2014-11-21 08:49:17 -08:00
ltgcc.m4
ltmain.sh Ensure libgcc_s unwinder is always used on 64-bit Solaris 10+/x86 (PR target/59788) 2014-02-04 09:31:38 +00:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS (Write After Approval): Add myself. 2015-05-16 13:46:58 +00:00
Makefile.def Makefile.def: Add libmpx. 2015-03-10 09:37:41 +00:00
Makefile.in revert: configure.ac: Add -std=c++98 to stage1_cxxflags. 2015-05-21 13:05:33 -04:00
Makefile.tpl revert: configure.ac: Add -std=c++98 to stage1_cxxflags. 2015-05-21 13:05:33 -04:00
missing Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
mkdep
mkinstalldirs Update from upstream Automake files. 2014-11-16 14:07:13 +00:00
move-if-change Update move-if-change from gnulib 2014-11-16 16:12:44 +00:00
README
symlink-tree
ylwrap Update from upstream Automake files. 2014-11-16 14:07:13 +00:00

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.