2 # Copyright (C) 2006-2013 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=@GNU
/binutils
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
16 PKG_VERSION
:=$(PKG_VERSION
)
17 PKG_HASH
:=3ced91db9bf01182b7e420eab68039f2083aed0a214c0424e257eae3ddee8607
20 PKG_LIBTOOL_PATHS
:=. gas bfd opcodes gprof binutils
ld libiberty gold intl
21 PKG_REMOVE_FILES
:=libtool.m4
24 PKG_MAINTAINER
:=Felix Fietkau
<nbd@nbd.name
>
26 PKG_CPE_ID
:=cpe
:/a
:gnu
:binutils
30 include $(INCLUDE_DIR
)/nls.mk
31 include $(INCLUDE_DIR
)/package.mk
37 DEPENDS
:=+zlib
$(ICONV_DEPENDS
) $(INTL_DEPENDS
)
47 define Package
/libopcodes
54 define Package
/binutils
59 ALTERNATIVES
:=200:/usr
/bin
/strings
:/usr
/bin
/binutils-strings
62 define Package
/objdump
66 DEPENDS
:=+libopcodes
+libctf
73 DEPENDS
:=+zlib
+libbfd
76 define Package
/binutils
/description
77 The Binutils package contains a linker
, an assembler
, and other tools for handling object files
80 TARGET_CFLAGS
+= $(FPIC
) -Wno-unused-value
83 --host
=$(REAL_GNU_TARGET_NAME
) \
84 --target
=$(REAL_GNU_TARGET_NAME
) \
86 --enable-install-libiberty \
87 --enable-install-libbfd \
88 --enable-install-libctf
91 $(call Build
/Install
/Default
)
92 $(MAKE
) -C
$(PKG_BUILD_DIR
)/libiberty \
93 target_header_dir
=libiberty \
94 DESTDIR
="$(PKG_INSTALL_DIR)" \
99 define Build
/InstallDev
100 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
103 define Package
/libbfd
/install
104 $(INSTALL_DIR
) $(1)/usr
/lib
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbfd
*.so
* $(1)/usr
/lib
/
108 define Package
/libctf
/install
109 $(INSTALL_DIR
) $(1)/usr
/lib
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libctf
*.so
* $(1)/usr
/lib
/
113 define Package
/libopcodes
/install
114 $(INSTALL_DIR
) $(1)/usr
/lib
115 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopcodes
*.so
$(1)/usr
/lib
/
118 define Package
/objdump
/install
119 $(INSTALL_DIR
) $(1)/usr
/bin
120 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/objdump
$(1)/usr
/bin
/
123 define Package
/ar/install
124 $(INSTALL_DIR
) $(1)/usr
/bin
125 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ar $(1)/usr
/bin
/
128 define Package
/binutils
/install
129 $(INSTALL_DIR
) $(1)/usr
$(1)/bin
130 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ $(1)/usr
/
131 mv
$(1)/usr
/bin
/strings
$(1)/usr
/bin
/binutils-strings
132 rm -f
$(1)/usr
/bin
/objdump
133 rm -f
$(1)/usr
/bin
/ar
136 $(eval
$(call BuildPackage
,libbfd
))
137 $(eval
$(call BuildPackage
,libctf
))
138 $(eval
$(call BuildPackage
,libopcodes
))
139 $(eval
$(call BuildPackage
,binutils
))
140 $(eval
$(call BuildPackage
,objdump
))
141 $(eval
$(call BuildPackage
,ar))