Skip to content

Commit

Permalink
Don't use -fPIC on static builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
andlabs committed May 30, 2016
1 parent 2ed29a7 commit 708d8f3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/GNUbasegcc.mk
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
# 16 october 2015

# TODO the loader looks for the soname, not the base name, which is frustrating

# Global flags.

CFLAGS += \
-fPIC \
-Wall -Wextra -pedantic \
-Wno-unused-parameter \
-Wno-switch \
Expand All @@ -14,14 +11,17 @@ CFLAGS += \
# C++11 is needed due to stupid rules involving commas at the end of enum lists that C++03 stupidly didn't follow
# This means sorry, no GCC 2 for Haiku builds :(
CXXFLAGS += \
-fPIC \
-Wall -Wextra -pedantic \
-Wno-unused-parameter \
-Wno-switch \
--std=c++11

LDFLAGS += \
-fPIC
# -fPIC shouldn't be used with static builds (see https://github.com/andlabs/libui/issues/72#issuecomment-222395547)
ifeq (,$(STATIC))
CFLAGS += -fPIC
CXXFLAGS += -fPIC
LDFLAGS += -fPIC
endif

ifneq ($(RELEASE),1)
CFLAGS += -g
Expand Down

0 comments on commit 708d8f3

Please sign in to comment.