aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMiodrag Milanovic <mmicko@gmail.com>2018-08-18 14:00:55 +0200
committerMiodrag Milanovic <mmicko@gmail.com>2018-08-18 14:00:55 +0200
commit3e20788c24d2b0472fa9e3ecee31b636c5866d8d (patch)
tree0dad0061783de89228e90584bea0796a1b673da0 /Makefile
parent620ebd3c6d2d1ad8746d7aaa9136f7df3762d9d1 (diff)
downloadyosys-3e20788c24d2b0472fa9e3ecee31b636c5866d8d.tar.gz
yosys-3e20788c24d2b0472fa9e3ecee31b636c5866d8d.tar.bz2
yosys-3e20788c24d2b0472fa9e3ecee31b636c5866d8d.zip
Added gcc-static for easier cross compilation
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index eed4e8f23..c2a3293ae 100644
--- a/Makefile
+++ b/Makefile
@@ -156,6 +156,14 @@ LD = gcc
CXXFLAGS += -std=c++11 -Os
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
+else ifeq ($(CONFIG),gcc-static)
+LD = $(CXX)
+LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
+LDLIBS := -static $(filter-out -lrt,$(LDLIBS))
+CXXFLAGS += -std=c++11 -Os
+ABCMKARGS = CC="$(CC)" CXX="$(CXX)" LD="$(LD)" LIBS="-static -lm -ldl -pthread" OPTFLAGS="-O" \
+ ARCHFLAGS="-DABC_USE_STDINT_H -DABC_NO_DYNAMIC_LINKING=1 -Wno-unused-but-set-variable" ABC_USE_NO_READLINE=1
+
else ifeq ($(CONFIG),gcc-4.8)
CXX = gcc-4.8
LD = gcc-4.8
@@ -671,6 +679,12 @@ config-clang: clean
config-gcc: clean
echo 'CONFIG := gcc' > Makefile.conf
+config-gcc-static: clean
+ echo 'CONFIG := gcc-static' > Makefile.conf
+ echo 'ENABLE_PLUGINS := 0' >> Makefile.conf
+ echo 'ENABLE_READLINE := 0' >> Makefile.conf
+ echo 'ENABLE_TCL := 0' >> Makefile.conf
+
config-gcc-4.8: clean
echo 'CONFIG := gcc-4.8' > Makefile.conf
@@ -712,5 +726,5 @@ echo-git-rev:
-include techlibs/*/*.d
.PHONY: all top-all abc test install install-abc manual clean mrproper qtcreator
-.PHONY: config-clean config-clang config-gcc config-gcc-4.8 config-gprof config-sudo
+.PHONY: config-clean config-clang config-gcc config-gcc-static config-gcc-4.8 config-gprof config-sudo