Add changes for krell related products to binutils. Add a patch that installs libiberty_pic.a which krell products will favor/use.

This commit is contained in:
Jim Galarowicz 2015-07-21 10:15:17 -05:00
parent 19123b4c48
commit d1f127d8ef
2 changed files with 72 additions and 6 deletions

View file

@ -0,0 +1,52 @@
--- binutils-2.24/libiberty/Makefile.in 2013-11-04 10:33:40.000000000 -0500
+++ binutils-2.24-fixes/libiberty/Makefile.in 2014-10-17 16:22:31.413655000 -0400
@@ -66,6 +66,7 @@
MAKEOVERRIDES =
TARGETLIB = ./libiberty.a
+TARGETLIBPIC = ./libiberty_pic.a
TESTLIB = ./testlib.a
LIBOBJS = @LIBOBJS@
@@ -355,27 +356,27 @@
# since it will be passed the multilib flags.
MULTIOSDIR = `$(CC) $(CFLAGS) -print-multi-os-directory`
install_to_libdir: all
- if test -n "${target_header_dir}"; then \
- ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
- $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
- ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
- mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
- case "${target_header_dir}" in \
- /*) thd=${target_header_dir};; \
- *) thd=${includedir}/${target_header_dir};; \
- esac; \
- ${mkinstalldirs} $(DESTDIR)$${thd}; \
- for h in ${INSTALLED_HEADERS}; do \
- ${INSTALL_DATA} $$h $(DESTDIR)$${thd}; \
- done; \
- fi
+ ${mkinstalldirs} $(DESTDIR)$(libdir)/$(MULTIOSDIR); \
+ $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n; \
+ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n; \
+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n ;$(RANLIB) $(TARGETLIB)n ); \
+ ( cd $(DESTDIR)$(libdir)/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n ;$(RANLIB) $(TARGETLIBPIC)n ); \
+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIB); \
+ mv -f $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(libdir)/$(MULTIOSDIR)/$(TARGETLIBPIC); \
+ ${mkinstalldirs} $(DESTDIR)$${includedir}; \
+ for h in ${INSTALLED_HEADERS}; do \
+ ${INSTALL_DATA} $$h $(DESTDIR)$${includedir}; \
+ done;
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
install_to_tooldir: all
${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)
$(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n
+ $(INSTALL_DATA) pic/$(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n
( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIB)n; $(RANLIB) $(TARGETLIB)n )
+ ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; chmod 644 $(TARGETLIBPIC)n; $(RANLIB) $(TARGETLIBPIC)n )
mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)
+ mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIBPIC)
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
# required-list was used when building a shared bfd/opcodes/libiberty

View file

@ -3,15 +3,29 @@
class Binutils(Package):
"""GNU binutils, which contain the linker, assembler, objdump and others"""
homepage = "http://www.gnu.org/software/binutils/"
url = "ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2"
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66')
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b')
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e')
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764')
version('2.25', 'd9f3303f802a5b6b0bb73a335ab89d66',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.bz2")
version('2.24', 'e0f71a7b2ddab0f8612336ac81d9636b',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.24.tar.bz2")
version('2.23.2', '4f8fa651e35ef262edc01d60fb45702e',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.23.2.tar.bz2")
version('2.20.1', '2b9dc8f2b7dbd5ec5992c6e29de0b764',url="ftp://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2")
# Add a patch that creates binutils libiberty_pic.a which is preferred by OpenSpeedShop and cbtf-krell
variant('krellpatch', default=False, description="build with openspeedshop based patch.")
patch('binutilskrell-2.24.patch', when='@2.24+krellpatch')
def install(self, spec, prefix):
configure("--prefix=%s" % prefix)
# Add additional configuration options for use in the OpenSpeedShop project
if '+krellpatch' in spec:
configure('--prefix', self.prefix,
'--libdir', self.prefix.lib,
'--enable-shared',
'--enable-install-libiberty',
'--disable-multilib'
)
else:
configure("--prefix=%s" % prefix)
make()
make("install")