aboutsummaryrefslogtreecommitdiff
path: root/ld/Makefile.in
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-02-27 14:09:29 +0000
committerNick Clifton <nickc@redhat.com>2014-02-27 14:13:43 +0000
commit5063daf7357ccdc2c9e899ca0421c2e8e580c88d (patch)
treead294aff0d6abde7e8064a16f4503d01dfe90867 /ld/Makefile.in
parentdb434ba03edb5491d48415069d6116b5037e6fa1 (diff)
downloadgdb-5063daf7357ccdc2c9e899ca0421c2e8e580c88d.zip
gdb-5063daf7357ccdc2c9e899ca0421c2e8e580c88d.tar.gz
gdb-5063daf7357ccdc2c9e899ca0421c2e8e580c88d.tar.bz2
This patch adds a default manifest in to the final links performed by the Cygwin and MinGW targets.
The manifest is necessary in order for the linked binaries to be executed in a Windows 8 environment. The manifest is added using a linker script so that this feature will be compiler-neutral. The resource merging code in the linker means that if an application provides its own manifest then the default manifest will be ignored. * configure.in (all_emul_extra_binaries): New variable. Populated by invoking configure.tgt. (EMUL_EXTRA_BINARIES): New substitution. * configure: Regenerate. * configure.tgt (target_extra_binaries): New variable. Set to default-manifest.o for Cygwin and MinGW targets. * Makefile.am (EMUL_EXTRA_BINARIES): New variable. Initialised by the configure script. (ALL_EMUL_EXTRA_BINARIES): New variable. (default-manifest.o): New rule to build the default manifest. (ld_new_DEPENDENCIES): Add EMUL_EXTRA_BINARIES. (install-data-local): Add EMUL_EXTRA_BINARIES. * Makefile.in: Regenerate. * ld.texinfo: Document default manifest support. * emulparams/i386pe.sh (DEFAULT_MANIFEST): Define. * emulparams/i386pep.sh (DEFAULT_MANIFEST): Define. * emultempl/default-manifest.rc: New file. * scripttempl/pe.sc (R_RSRC): Include DEFAULT_MANIFEST, if defined. * scripttempl/pep.sc (R_RSRC): Likewise. * ld-pe/longsecn-1.d: Allow for extra sections. * ld-pe/longsecn-2.d: Likewise. * ld-pe/longsecn.d: Likewise. * ld-pe/secrel.d: Likewise.
Diffstat (limited to 'ld/Makefile.in')
-rw-r--r--ld/Makefile.in17
1 files changed, 14 insertions, 3 deletions
diff --git a/ld/Makefile.in b/ld/Makefile.in
index 59cba73..1a3d9ac 100644
--- a/ld/Makefile.in
+++ b/ld/Makefile.in
@@ -219,6 +219,7 @@ EGREP = @EGREP@
EMUL = @EMUL@
EMULATION_LIBPATH = @EMULATION_LIBPATH@
EMULATION_OFILES = @EMULATION_OFILES@
+EMUL_EXTRA_BINARIES = @EMUL_EXTRA_BINARIES@
EMUL_EXTRA_OFILES = @EMUL_EXTRA_OFILES@
EXEEXT = @EXEEXT@
FGREP = @FGREP@
@@ -388,6 +389,7 @@ AM_CFLAGS = $(WARN_CFLAGS)
# We can't put the scripts in $(datadir) because the SEARCH_DIR
# directives need to be different for native and cross linkers.
scriptdir = $(tooldir)/lib
+EMUL_DEPS =
BASEDIR = $(srcdir)/..
BFDDIR = $(BASEDIR)/bfd
INCDIR = $(BASEDIR)/include
@@ -795,6 +797,9 @@ ALL_EMUL_EXTRA_OFILES = \
pe-dll.@OBJEXT@ \
pep-dll.@OBJEXT@
+ALL_EMUL_EXTRA_BINARIES = \
+ default-manifest.@OBJEXT@
+
CFILES = ldctor.c ldemul.c ldexp.c ldfile.c ldlang.c \
ldmain.c ldmisc.c ldver.c ldwrite.c lexsup.c \
mri.c ldcref.c pe-dll.c pep-dll.c ldlex-wrapper.c \
@@ -838,7 +843,9 @@ EXTRA_ld_new_SOURCES = deffilep.y ldlex.l pep-dll.c pe-dll.c \
ld_new_SOURCES = ldgram.y ldlex-wrapper.c lexsup.c ldlang.c mri.c ldctor.c ldmain.c \
ldwrite.c ldexp.c ldemul.c ldver.c ldmisc.c ldfile.c ldcref.c $(PLUGIN_C)
-ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+ld_new_DEPENDENCIES = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(EMUL_EXTRA_BINARIES) \
+ $(BFDLIB) $(LIBIBERTY) $(LIBINTL_DEP)
+
ld_new_LDADD = $(EMULATION_OFILES) $(EMUL_EXTRA_OFILES) $(BFDLIB) $(LIBIBERTY) $(LIBINTL)
# A test program for C++ constructors and destructors.
@@ -3353,6 +3360,10 @@ eshlelf64_nbsd.c: $(srcdir)/emulparams/shlelf64_nbsd.sh \
$(ELF_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf64_nbsd "$(tdir_shlelf64_nbsd)"
+# Rule to create a manifest file for Cygwin and Mingw.
+default-manifest.o: $(srcdir)/emultempl/default-manifest.rc
+ ../binutils/windres -o $@ $<
+
check-DEJAGNU: site.exp
srcroot=`cd $(srcdir) && pwd`; export srcroot; \
r=`pwd`; export r; \
@@ -3438,9 +3449,9 @@ install-exec-local: ld-new$(EXEEXT) install-binPROGRAMS
fi; \
fi
-install-data-local:
+install-data-local: $(EMUL_EXTRA_BINARIES)
$(mkinstalldirs) $(DESTDIR)$(scriptdir)/ldscripts
- for f in ldscripts/*; do \
+ for f in ldscripts/* $(EMUL_EXTRA_BINARIES); do \
$(INSTALL_DATA) $$f $(DESTDIR)$(scriptdir)/$$f ; \
done
diststuff: info $(EXTRA_DIST)