nasm: disable LTO, remove host specific workarounds
[openwrt/openwrt.git] / toolchain / nasm / Makefile
1 #
2 # This is free software, licensed under the GNU General Public License v2.
3 # See /LICENSE for more information.
4 #
5 include $(TOPDIR)/rules.mk
6
7 PKG_NAME:=nasm
8 PKG_VERSION:=2.13.03
9
10 PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/
11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
12
13 PKG_HASH:=812ecfb0dcbc5bd409aaa8f61c7de94c5b8752a7b00c632883d15b2ed6452573
14
15 HOST_BUILD_PARALLEL:=1
16
17 include $(INCLUDE_DIR)/toolchain-build.mk
18
19 HOST_CONFIGURE_ARGS+= \
20 --target=$(REAL_GNU_TARGET_NAME) \
21 --with-sysroot=$(TOOLCHAIN_DIR) \
22 --disable-lto \
23 --disable-werror \
24 --disable-gdb \
25 $(SOFT_FLOAT_CONFIG_OPTION) \
26
27 define Host/Prepare
28 $(call Host/Prepare/Default)
29 ln -snf $(notdir $(HOST_BUILD_DIR)) $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
30 $(CP) $(SCRIPT_DIR)/config.{guess,sub} $(HOST_BUILD_DIR)/
31 endef
32
33 define Host/Configure
34 (cd $(HOST_BUILD_DIR); \
35 ./autogen.sh \
36 );
37 $(call Host/Configure/Default)
38 endef
39
40 define Host/Install
41 $(MAKE) -C $(HOST_BUILD_DIR) \
42 $(HOST_MAKE_FLAGS) \
43 prefix=$(TOOLCHAIN_DIR) \
44 install
45 endef
46
47 define Host/Clean
48 rm -rf \
49 $(HOST_BUILD_DIR) \
50 $(BUILD_DIR_TOOLCHAIN)/$(PKG_NAME)
51 endef
52
53 $(eval $(call HostBuild))