-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinutils.mk
40 lines (36 loc) · 1.41 KB
/
binutils.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# This file is part of MXE. See LICENSE.md for licensing information.
PKG := binutils
$(PKG)_WEBSITE := https://www.gnu.org/software/binutils/
$(PKG)_DESCR := GNU Binutils
$(PKG)_VERSION := 2.38
$(PKG)_CHECKSUM := 070ec71cf077a6a58e0b959f05a09a35015378c2d8a51e90f3aeabfe30590ef8
$(PKG)_SUBDIR := binutils-$($(PKG)_VERSION)
$(PKG)_FILE := binutils-$($(PKG)_VERSION).tar.bz2
$(PKG)_URL := https://ftp.gnu.org/gnu/binutils/$($(PKG)_FILE)
$(PKG)_URL_2 := https://ftpmirror.gnu.org/binutils/$($(PKG)_FILE)
$(PKG)_DEPS :=
define $(PKG)_UPDATE
$(WGET) -q -O- 'https://ftp.gnu.org/gnu/binutils/?C=M;O=D' | \
$(SED) -n 's,.*<a href="binutils-\([0-9][^"]*\)\.tar.*,\1,p' | \
$(SORT) -V | \
tail -1
endef
define $(PKG)_BUILD
cd '$(BUILD_DIR)' && '$(SOURCE_DIR)/configure' \
$(MXE_DISABLE_DOC_OPTS) \
--target='$(TARGET)' \
--build='$(BUILD)' \
--prefix='$(PREFIX)' \
--disable-multilib \
--enable-deterministic-archives \
--with-gcc \
--with-gnu-ld \
--with-gnu-as \
--disable-nls \
--disable-shared \
--disable-werror
$(TOUCH) -d2020-01-01 '$(SOURCE_DIR)/gas/doc/.dirstamp'
$(MAKE) -C '$(BUILD_DIR)' -j '$(JOBS)'
$(MAKE) -C '$(BUILD_DIR)' -j 1 $(INSTALL_STRIP_TOOLCHAIN)
rm -f $(addprefix $(PREFIX)/$(TARGET)/bin/, ar as dlltool ld ld.bfd nm objcopy objdump ranlib readelf strip)
endef