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
:=f00b0e8803dc9bab1e2165bd568528135be734df3fabf8d0161828cd56028952
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
90 $(call Build
/Install
/Default
)
91 $(MAKE
) -C
$(PKG_BUILD_DIR
)/libiberty \
92 target_header_dir
=libiberty \
93 DESTDIR
="$(PKG_INSTALL_DIR)" \
98 define Build
/InstallDev
99 $(CP
) $(PKG_INSTALL_DIR
)/* $(1)/
102 define Package
/libbfd
/install
103 $(INSTALL_DIR
) $(1)/usr
/lib
104 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libbfd
*.so
* $(1)/usr
/lib
/
107 define Package
/libctf
/install
108 $(INSTALL_DIR
) $(1)/usr
/lib
109 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libctf.so
* $(1)/usr
/lib
/
112 define Package
/libopcodes
/install
113 $(INSTALL_DIR
) $(1)/usr
/lib
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libopcodes
*.so
$(1)/usr
/lib
/
117 define Package
/objdump
/install
118 $(INSTALL_DIR
) $(1)/usr
/bin
119 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/objdump
$(1)/usr
/bin
/
122 define Package
/ar/install
123 $(INSTALL_DIR
) $(1)/usr
/bin
124 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ar $(1)/usr
/bin
/
127 define Package
/binutils
/install
128 $(INSTALL_DIR
) $(1)/usr
$(1)/bin
129 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ $(1)/usr
/
130 mv
$(1)/usr
/bin
/strings
$(1)/usr
/bin
/binutils-strings
131 rm -f
$(1)/usr
/bin
/objdump
132 rm -f
$(1)/usr
/bin
/ar
135 $(eval
$(call BuildPackage
,libbfd
))
136 $(eval
$(call BuildPackage
,libctf
))
137 $(eval
$(call BuildPackage
,libopcodes
))
138 $(eval
$(call BuildPackage
,binutils
))
139 $(eval
$(call BuildPackage
,objdump
))
140 $(eval
$(call BuildPackage
,ar))