mirror of https://github.com/YosysHQ/yosys.git
Merge pull request #608 from mmicko/master
Static builds and cross-compilation support
This commit is contained in:
commit
519fe50b94
20
Makefile
20
Makefile
|
@ -156,6 +156,18 @@ LD = gcc
|
||||||
CXXFLAGS += -std=c++11 -Os
|
CXXFLAGS += -std=c++11 -Os
|
||||||
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
|
ABCMKARGS += ARCHFLAGS="-DABC_USE_STDINT_H"
|
||||||
|
|
||||||
|
else ifeq ($(CONFIG),gcc-static)
|
||||||
|
LD = $(CXX)
|
||||||
|
LDFLAGS := $(filter-out -rdynamic,$(LDFLAGS)) -s
|
||||||
|
LDLIBS := $(filter-out -lrt,$(LDLIBS))
|
||||||
|
CXXFLAGS := $(filter-out -fPIC,$(CXXFLAGS))
|
||||||
|
CXXFLAGS += -std=c++11 -Os
|
||||||
|
ABCMKARGS = CC="$(CC)" CXX="$(CXX)" LD="$(LD)" ABC_USE_LIBSTDCXX=1 LIBS="-lm -lpthread -static" OPTFLAGS="-O" \
|
||||||
|
ARCHFLAGS="-DABC_USE_STDINT_H -DABC_NO_DYNAMIC_LINKING=1 -Wno-unused-but-set-variable $(ARCHFLAGS)" ABC_USE_NO_READLINE=1
|
||||||
|
ifeq ($(DISABLE_ABC_THREADS),1)
|
||||||
|
ABCMKARGS += "ABC_USE_NO_PTHREADS=1"
|
||||||
|
endif
|
||||||
|
|
||||||
else ifeq ($(CONFIG),gcc-4.8)
|
else ifeq ($(CONFIG),gcc-4.8)
|
||||||
CXX = gcc-4.8
|
CXX = gcc-4.8
|
||||||
LD = gcc-4.8
|
LD = gcc-4.8
|
||||||
|
@ -671,6 +683,12 @@ config-clang: clean
|
||||||
config-gcc: clean
|
config-gcc: clean
|
||||||
echo 'CONFIG := gcc' > Makefile.conf
|
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
|
config-gcc-4.8: clean
|
||||||
echo 'CONFIG := gcc-4.8' > Makefile.conf
|
echo 'CONFIG := gcc-4.8' > Makefile.conf
|
||||||
|
|
||||||
|
@ -712,5 +730,5 @@ echo-git-rev:
|
||||||
-include techlibs/*/*.d
|
-include techlibs/*/*.d
|
||||||
|
|
||||||
.PHONY: all top-all abc test install install-abc manual clean mrproper qtcreator
|
.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
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue