Enforce ld --no-undefined, move genode-lib CFLAGS back

This commit is contained in:
Ehmry - 2019-03-03 13:31:07 +01:00
parent 9446c4e4ae
commit 26f30d648c
1 changed files with 37 additions and 7 deletions

View File

@ -1,12 +1,42 @@
!libretro_cc = |> ^ CC %f^ $(CC) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) $(INCFLAGS) -c %f -o %o |> %f.o
!libretro_cxx = |> ^ CXX %f^ $(CXX) `pkg-config --cflags $(CORE_PKGS)` $(CFLAGS) $(CXXFLAGS) $(INCFLAGS) -c %f -o %o |> %f.o
!libretro_cc = |> ^ CC %f^ \
$(CC) \
`pkg-config --cflags $(CORE_PKGS)` \
$(CFLAGS) $(INCFLAGS) \
`pkg-config --cflags genode-lib` \
-c %f -o %o \
|> %f.o
!libretro_core_link = |> ^o LD %d^ $(LD) -shared --version-script=$(LINK_T) %f -o %o `pkg-config --libs $(CORE_PKGS)` $(LDFLAGS) |> libretro.so
!libretro_cxx = |> ^ CXX %f^ \
$(CXX) \
`pkg-config --cflags $(CORE_PKGS)` \
$(CFLAGS) $(CXXFLAGS) $(INCFLAGS) \
`pkg-config --cflags genode-lib` \
-c %f -o %o \
|> %f.o
!publish_core = | libretro.so |> ^ STRIP %o^ strip -o %o %f |> $(DEPOT_BIN_DIR)/libretro-$(TARGET_NAME)/@(DEPOT_VERSION)/%b
!publish_core_archives = |> ^ varse %d archives^ tup varsed %f %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/archives
!publish_core_runtime = |> ^ validate %d runtime^ xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/<runtimes>
!libretro_core_link = |> ^o LD %d^ \
$(LD) %f -o %o \
-shared --version-script=$(LINK_T) $(NO_UNDEFINED) \
$(LDFLAGS) \
`pkg-config --libs $(CORE_PKGS)` \
`pkg-config --libs genode-lib` \
|> libretro.so
!publish_core = | libretro.so |> ^ STRIP %o^ \
strip -o %o %f \
|> $(DEPOT_BIN_DIR)/libretro-$(TARGET_NAME)/@(DEPOT_VERSION)/%b
!publish_core_archives = |> ^ varse %d archives^ \
tup varsed %f %o ; \
echo @(DEPOT_USER)/src/libretro-$(TARGET_NAME)/@(DEPOT_VERSION) >> %o \
|> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/archives
!publish_core_runtime = |> ^ validate %d runtime^ \
xmllint -schema $(ERRATA_DIR)/runtime.xsd %f > %o \
|> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/runtime $(DEPOT_DIR)/<libretro-runtimes>
!publish_core_metadata = |> ^ CP %o^ cp %f %o |> $(DEPOT_PKG_DIR)/$(TARGET_NAME)/@(DEPOT_VERSION)/%b
LINK_T = $(TUP_CWD)/link.T
CORE_PKGS += genode-lib
CFLAGS += -D__LIBRETRO__ -DFRONTEND_SUPPORTS_RGB565
NO_UNDEFINED = --no-undefined