aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2021-07-28 17:04:21 -0700
committerAndrew Waterman <andrew@sifive.com>2021-07-28 17:04:21 -0700
commitc8e510ec65e401832a1a3d8493a20b6b6705f957 (patch)
tree96730249ac0993bc3cb03b5a421d9924dcf92280
parent74b49a97fe4b381ad0e81b1e3240153a98f587af (diff)
downloadriscv-isa-sim-c8e510ec65e401832a1a3d8493a20b6b6705f957.zip
riscv-isa-sim-c8e510ec65e401832a1a3d8493a20b6b6705f957.tar.gz
riscv-isa-sim-c8e510ec65e401832a1a3d8493a20b6b6705f957.tar.bz2
Significantly speed up compilation with GCC
Precompiled headers were broken because they weren't compiled with the same -fPIC setting as the rest of the code. Fix by just making everything use -fPIC.
-rw-r--r--Makefile.in2
-rw-r--r--customext/customext.mk.in2
-rw-r--r--disasm/disasm.mk.in2
-rw-r--r--fesvr/fesvr.mk.in2
-rw-r--r--riscv/riscv.mk.in2
-rw-r--r--softfloat/softfloat.mk.in2
6 files changed, 1 insertions, 11 deletions
diff --git a/Makefile.in b/Makefile.in
index 64e5e23..deebc5b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -92,7 +92,7 @@ VPATH := $(addprefix $(src_dir)/, $(sprojs_enabled))
# These all appear on the command line, from lowest precedence to
# highest.
-default-CFLAGS := -DPREFIX=\"$(prefix)\" -Wall -Wno-unused -g -O2
+default-CFLAGS := -DPREFIX=\"$(prefix)\" -Wall -Wno-unused -g -O2 -fPIC
default-CXXFLAGS := $(default-CFLAGS) -std=c++11
mcppbs-CPPFLAGS := @CPPFLAGS@
diff --git a/customext/customext.mk.in b/customext/customext.mk.in
index 4107d18..a14e771 100644
--- a/customext/customext.mk.in
+++ b/customext/customext.mk.in
@@ -8,6 +8,4 @@ customext_srcs = \
dummy_rocc.cc \
cflush.cc \
-customext_CFLAGS = -fPIC
-
customext_install_shared_lib = yes
diff --git a/disasm/disasm.mk.in b/disasm/disasm.mk.in
index 039a717..9eafb12 100644
--- a/disasm/disasm.mk.in
+++ b/disasm/disasm.mk.in
@@ -1,5 +1,3 @@
-disasm_CFLAGS = -fPIC
-
disasm_srcs = \
disasm.cc \
regnames.cc \
diff --git a/fesvr/fesvr.mk.in b/fesvr/fesvr.mk.in
index 079c1b1..695de52 100644
--- a/fesvr/fesvr.mk.in
+++ b/fesvr/fesvr.mk.in
@@ -15,8 +15,6 @@ fesvr_hdrs = \
rfb.h \
tsi.h \
-fesvr_CFLAGS = -fPIC
-
fesvr_install_hdrs = $(fesvr_hdrs)
fesvr_install_config_hdr = yes
diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in
index bb7b374..262fcdf 100644
--- a/riscv/riscv.mk.in
+++ b/riscv/riscv.mk.in
@@ -7,8 +7,6 @@ riscv_subproject_deps = \
riscv_install_prog_srcs = \
-riscv_CFLAGS = -fPIC
-
riscv_hdrs = \
abstract_device.h \
common.h \
diff --git a/softfloat/softfloat.mk.in b/softfloat/softfloat.mk.in
index 07dca16..a20ab7e 100644
--- a/softfloat/softfloat.mk.in
+++ b/softfloat/softfloat.mk.in
@@ -234,8 +234,6 @@ softfloat_c_srcs = \
ui64_to_f32.c \
ui64_to_f64.c \
-softfloat_CFLAGS = -fPIC
-
softfloat_install_shared_lib = yes
softfloat_test_srcs =