mirror of
https://github.com/riscv-software-src/riscv-isa-sim.git
synced 2025-10-14 02:07:30 +08:00
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.
This commit is contained 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@
|
||||
|
@@ -8,6 +8,4 @@ customext_srcs = \
|
||||
dummy_rocc.cc \
|
||||
cflush.cc \
|
||||
|
||||
customext_CFLAGS = -fPIC
|
||||
|
||||
customext_install_shared_lib = yes
|
||||
|
@@ -1,5 +1,3 @@
|
||||
disasm_CFLAGS = -fPIC
|
||||
|
||||
disasm_srcs = \
|
||||
disasm.cc \
|
||||
regnames.cc \
|
||||
|
@@ -15,8 +15,6 @@ fesvr_hdrs = \
|
||||
rfb.h \
|
||||
tsi.h \
|
||||
|
||||
fesvr_CFLAGS = -fPIC
|
||||
|
||||
fesvr_install_hdrs = $(fesvr_hdrs)
|
||||
|
||||
fesvr_install_config_hdr = yes
|
||||
|
@@ -7,8 +7,6 @@ riscv_subproject_deps = \
|
||||
|
||||
riscv_install_prog_srcs = \
|
||||
|
||||
riscv_CFLAGS = -fPIC
|
||||
|
||||
riscv_hdrs = \
|
||||
abstract_device.h \
|
||||
common.h \
|
||||
|
@@ -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 =
|
||||
|
Reference in New Issue
Block a user