Lines 87-92
Link Here
|
87 |
#include "gcc.h" |
87 |
#include "gcc.h" |
88 |
#include "flags.h" |
88 |
#include "flags.h" |
89 |
|
89 |
|
|
|
90 |
#include "hardened-stubs.h" |
91 |
|
90 |
/* By default there is no special suffix for target executables. */ |
92 |
/* By default there is no special suffix for target executables. */ |
91 |
/* FIXME: when autoconf is fixed, remove the host check - dj */ |
93 |
/* FIXME: when autoconf is fixed, remove the host check - dj */ |
92 |
#if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX) |
94 |
#if defined(TARGET_EXECUTABLE_SUFFIX) && defined(HOST_EXECUTABLE_SUFFIX) |
Lines 628-633
Link Here
|
628 |
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}" |
630 |
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}" |
629 |
#endif |
631 |
#endif |
630 |
|
632 |
|
|
|
633 |
/* Gentoo Hardened definitions may overwrite the default specs */ |
634 |
#ifdef GENTOO_HARDENED_GCC_STARTFILE_SPEC |
635 |
#undef STARTFILE_SPEC |
636 |
#define STARTFILE_SPEC GENTOO_HARDENED_GCC_STARTFILE_SPEC |
637 |
#endif |
638 |
|
631 |
/* config.h can define SWITCHES_NEED_SPACES to control which options |
639 |
/* config.h can define SWITCHES_NEED_SPACES to control which options |
632 |
require spaces between the option and the argument. */ |
640 |
require spaces between the option and the argument. */ |
633 |
#ifndef SWITCHES_NEED_SPACES |
641 |
#ifndef SWITCHES_NEED_SPACES |
Lines 639-644
Link Here
|
639 |
#define ENDFILE_SPEC "" |
647 |
#define ENDFILE_SPEC "" |
640 |
#endif |
648 |
#endif |
641 |
|
649 |
|
|
|
650 |
/* Gentoo Hardened definitions may overwrite the default specs */ |
651 |
#ifdef GENTOO_HARDENED_GCC_ENDFILE_SPEC |
652 |
#undef ENDFILE_SPEC |
653 |
#define ENDFILE_SPEC GENTOO_HARDENED_GCC_ENDFILE_SPEC |
654 |
#endif |
655 |
|
642 |
#ifndef LINKER_NAME |
656 |
#ifndef LINKER_NAME |
643 |
#define LINKER_NAME "collect2" |
657 |
#define LINKER_NAME "collect2" |
644 |
#endif |
658 |
#endif |
Lines 699-705
Link Here
|
699 |
#ifndef LINK_COMMAND_SPEC |
713 |
#ifndef LINK_COMMAND_SPEC |
700 |
#define LINK_COMMAND_SPEC "\ |
714 |
#define LINK_COMMAND_SPEC "\ |
701 |
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ |
715 |
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\ |
702 |
%(linker) %l " LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ |
716 |
%(linker) %l " LINK_PIE_SPEC GENTOO_HARDENED_GCC_LINK_PIE_SPEC "%X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}\ |
703 |
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ |
717 |
%{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}\ |
704 |
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o %(mflib)\ |
718 |
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o %(mflib)\ |
705 |
%{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ |
719 |
%{fprofile-arcs|fprofile-generate|coverage:-lgcov}\ |
Lines 729-740
Link Here
|
729 |
#endif |
743 |
#endif |
730 |
|
744 |
|
731 |
static const char *asm_debug; |
745 |
static const char *asm_debug; |
732 |
static const char *cpp_spec = CPP_SPEC; |
746 |
static const char *cpp_spec = CPP_SPEC GENTOO_HARDENED_GCC_CPP_SPEC; |
733 |
static const char *cc1_spec = CC1_SPEC; |
747 |
static const char *cc1_spec = CC1_SPEC GENTOO_HARDENED_GCC_CC1_SPEC; |
734 |
static const char *cc1plus_spec = CC1PLUS_SPEC; |
748 |
static const char *cc1plus_spec = CC1PLUS_SPEC; |
735 |
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
749 |
static const char *link_gcc_c_sequence_spec = LINK_GCC_C_SEQUENCE_SPEC; |
736 |
static const char *link_ssp_spec = LINK_SSP_SPEC; |
750 |
static const char *link_ssp_spec = LINK_SSP_SPEC; |
737 |
static const char *asm_spec = ASM_SPEC; |
751 |
static const char *asm_spec = ASM_SPEC GENTOO_HARDENED_GCC_ASM_SPEC; |
738 |
static const char *asm_final_spec = ASM_FINAL_SPEC; |
752 |
static const char *asm_final_spec = ASM_FINAL_SPEC; |
739 |
static const char *link_spec = LINK_SPEC; |
753 |
static const char *link_spec = LINK_SPEC; |
740 |
static const char *lib_spec = LIB_SPEC; |
754 |
static const char *lib_spec = LIB_SPEC; |