mirror of
https://github.com/matrix-construct/construct
synced 2025-01-13 08:23:56 +01:00
ircd:Ⓜ️ Tweak symbol related linkflags for library.
Fix $EXTRA_ flags placement; improve Makefile formatting.
This commit is contained in:
parent
1abc66dccc
commit
110610f774
4 changed files with 80 additions and 96 deletions
|
@ -1,14 +1,10 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
$(EXTRA_CPPFLAGS) \
|
||||
###
|
||||
AM_CPPFLAGS =#
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/include
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-x c++-header \
|
||||
$(EXTRA_CXXFLAGS) \
|
||||
###
|
||||
AM_CXXFLAGS =#
|
||||
AM_CXXFLAGS += -x c++-header
|
||||
|
||||
if GCC
|
||||
AM_CXXFLAGS += -fpch-deps
|
||||
|
@ -32,6 +28,9 @@ LOWMEM_FLAGS= --param ggc-min-expand=1
|
|||
endif
|
||||
endif
|
||||
|
||||
AM_CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
|
||||
|
||||
# includedir = @includedir@/$(PACKAGE_TARNAME)
|
||||
includedir = @includedir@/ircd
|
||||
nobase_include_HEADERS = $(DEPS)
|
||||
|
|
|
@ -3,44 +3,33 @@ AUTOMAKE_OPTIONS = foreign
|
|||
BUILT_SOURCES =#
|
||||
CLEANFILES =#
|
||||
|
||||
DEFS += \
|
||||
-DIRCD_UNIT \
|
||||
###
|
||||
DEFS += -DIRCD_UNIT
|
||||
|
||||
CXXFLAGS += \
|
||||
$(EXTRA_CXXFLAGS) \
|
||||
###
|
||||
AM_CPPFLAGS =#
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/include
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-ftls-model=initial-exec \
|
||||
-include ircd/ircd.pic.h \
|
||||
###
|
||||
AM_CXXFLAGS =#
|
||||
AM_CXXFLAGS += -ftls-model=initial-exec
|
||||
AM_CXXFLAGS += -include ircd/ircd.pic.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
$(EXTRA_CPPFLAGS) \
|
||||
###
|
||||
|
||||
AM_LDFLAGS = \
|
||||
-version-info 3:2:0 \
|
||||
-Wl,--no-undefined-version \
|
||||
-Wl,--icf=all \
|
||||
-Wl,--sort-section=name \
|
||||
-Wl,--unresolved-symbols=ignore-in-shared-libs \
|
||||
-Wl,--wrap=pthread_create \
|
||||
-Wl,--wrap=pthread_join \
|
||||
-Wl,--wrap=pthread_tryjoin_np \
|
||||
-Wl,--wrap=pthread_timedjoin_np \
|
||||
-Wl,--wrap=pthread_clockjoin_np \
|
||||
-Wl,--wrap=pthread_self \
|
||||
-Wl,--wrap=pthread_setname_np \
|
||||
-Wl,--wrap=_dl_signal_exception \
|
||||
-Wl,-z,nodelete \
|
||||
-Wl,-z,nodlopen \
|
||||
-Wl,-z,lazy \
|
||||
$(PLATFORM_LDFLAGS) \
|
||||
$(EXTRA_LDFLAGS) \
|
||||
###
|
||||
AM_LDFLAGS =#
|
||||
AM_LDFLAGS += -version-info 3:2:0
|
||||
AM_LDFLAGS += -Wl,--no-undefined-version
|
||||
AM_LDFLAGS += -Wl,--icf=all
|
||||
AM_LDFLAGS += -Wl,--sort-section=name
|
||||
AM_LDFLAGS += -Wl,--unresolved-symbols=ignore-in-shared-libs
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_create
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_join
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_tryjoin_np
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_timedjoin_np
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_clockjoin_np
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_self
|
||||
AM_LDFLAGS += -Wl,--wrap=pthread_setname_np
|
||||
AM_LDFLAGS += -Wl,--wrap=_dl_signal_exception
|
||||
AM_LDFLAGS += -Wl,-z,nodelete
|
||||
AM_LDFLAGS += -Wl,-z,nodlopen
|
||||
AM_LDFLAGS += -Wl,-z,lazy
|
||||
AM_LDFLAGS += $(PLATFORM_LDFLAGS)
|
||||
|
||||
if CLANG
|
||||
AM_CXXFLAGS += -fno-c++-static-destructors
|
||||
|
@ -89,6 +78,10 @@ AM_LDFLAGS += -Wl,--enable-runtime-pseudo-reloc
|
|||
AM_LDFLAGS += -export-symbols-regex '*'
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
|
||||
AM_CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||
AM_LDFLAGS += $(EXTRA_LDFLAGS)
|
||||
|
||||
libircddir = @libdir@
|
||||
libircd_LTLIBRARIES = libircd.la
|
||||
|
||||
|
|
|
@ -3,35 +3,25 @@ AUTOMAKE_OPTIONS = foreign
|
|||
BUILT_SOURCES =#
|
||||
CLEANFILES =#
|
||||
|
||||
DEFS += \
|
||||
-DIRCD_UNIT \
|
||||
-DIRCD_MATRIX_UNIT \
|
||||
###
|
||||
DEFS += -DIRCD_UNIT
|
||||
DEFS += -DIRCD_MATRIX_UNIT
|
||||
|
||||
CXXFLAGS += \
|
||||
$(EXTRA_CXXFLAGS) \
|
||||
###
|
||||
AM_CPPFLAGS =#
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/include
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-include ircd/matrix.pic.h \
|
||||
-include ircd/mods/mapi.h \
|
||||
###
|
||||
AM_CXXFLAGS =#
|
||||
AM_CXXFLAGS += -include ircd/matrix.pic.h
|
||||
AM_CXXFLAGS += -include ircd/mods/mapi.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
$(EXTRA_CPPFLAGS) \
|
||||
###
|
||||
|
||||
AM_LDFLAGS = \
|
||||
-version-info 0:1:0 \
|
||||
-Wl,--no-undefined-version \
|
||||
-Wl,--allow-shlib-undefined \
|
||||
-Wl,--unresolved-symbols=ignore-in-shared-libs \
|
||||
-Wl,-z,lazy \
|
||||
-L$(top_srcdir)/ircd \
|
||||
$(PLATFORM_LDFLAGS) \
|
||||
$(EXTRA_LDFLAGS) \
|
||||
###
|
||||
AM_LDFLAGS =#
|
||||
AM_LDFLAGS += -version-info 0:1:0
|
||||
AM_LDFLAGS += -Wl,--sort-section=name
|
||||
AM_LDFLAGS += -Wl,--no-undefined-version
|
||||
AM_LDFLAGS += -Wl,--allow-shlib-undefined
|
||||
AM_LDFLAGS += -Wl,--unresolved-symbols=ignore-in-shared-libs
|
||||
AM_LDFLAGS += -Wl,-z,lazy
|
||||
AM_LDFLAGS += -L$(top_srcdir)/ircd
|
||||
AM_LDFLAGS += $(PLATFORM_LDFLAGS)
|
||||
|
||||
if GCC
|
||||
AM_CXXFLAGS += -ftls-model=local-dynamic
|
||||
|
@ -56,10 +46,19 @@ CLEANFILES += default.profdata
|
|||
endif
|
||||
endif
|
||||
|
||||
if GOLD
|
||||
AM_LDFLAGS += -Wl,--no-text-reorder
|
||||
AM_LDFLAGS += -Wl,--sort-common=descending
|
||||
endif
|
||||
|
||||
if MINGW
|
||||
AM_LDFLAGS += -Wl,--enable-runtime-pseudo-reloc
|
||||
endif
|
||||
|
||||
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
|
||||
AM_CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||
AM_LDFLAGS += $(EXTRA_LDFLAGS)
|
||||
|
||||
libircd_matrixdir = @libdir@
|
||||
libircd_matrix_LTLIBRARIES = \
|
||||
libircd_matrix.la \
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
AUTOMAKE_OPTIONS = foreign
|
||||
|
||||
DEFS += \
|
||||
-DIRCD_UNIT \
|
||||
-DIRCD_UNIT_MODULE \
|
||||
###
|
||||
DEFS += -DIRCD_UNIT
|
||||
DEFS += -DIRCD_UNIT_MODULE
|
||||
|
||||
CXXFLAGS += \
|
||||
$(EXTRA_CXXFLAGS) \
|
||||
###
|
||||
AM_CPPFLAGS =#
|
||||
AM_CPPFLAGS += -I$(top_srcdir)/include
|
||||
AM_CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||
|
||||
AM_CXXFLAGS = \
|
||||
-ftls-model=global-dynamic \
|
||||
-include $(top_srcdir)/include/ircd/matrix.pic.h \
|
||||
-include $(top_srcdir)/include/ircd/mods/mapi.h \
|
||||
###
|
||||
AM_CXXFLAGS =#
|
||||
AM_CXXFLAGS += -ftls-model=global-dynamic
|
||||
AM_CXXFLAGS += -include $(top_srcdir)/include/ircd/matrix.pic.h
|
||||
AM_CXXFLAGS += -include $(top_srcdir)/include/ircd/mods/mapi.h
|
||||
|
||||
AM_CPPFLAGS = \
|
||||
-I$(top_srcdir)/include \
|
||||
$(EXTRA_CPPFLAGS) \
|
||||
###
|
||||
AM_LDFLAGS =#
|
||||
AM_LDFLAGS += -module
|
||||
AM_LDFLAGS += -avoid-version
|
||||
AM_LDFLAGS += -Wl,--allow-shlib-undefined
|
||||
AM_LDFLAGS += -Wl,-z,lazy
|
||||
AM_LDFLAGS += -L$(top_srcdir)/ircd
|
||||
AM_LDFLAGS += -L$(top_srcdir)/matrix
|
||||
AM_LDFLAGS += $(PLATFORM_LDFLAGS)
|
||||
|
||||
#TODO: split options for if LD_GOLD
|
||||
AM_LDFLAGS = \
|
||||
-module \
|
||||
-avoid-version \
|
||||
-Wl,--allow-shlib-undefined \
|
||||
-Wl,-z,lazy \
|
||||
-L$(top_srcdir)/ircd \
|
||||
-L$(top_srcdir)/matrix \
|
||||
$(PLATFORM_LDFLAGS) \
|
||||
$(EXTRA_LDFLAGS) \
|
||||
###
|
||||
AM_CXXFLAGS += $(EXTRA_CXXFLAGS)
|
||||
AM_CPPFLAGS += $(EXTRA_CPPFLAGS)
|
||||
AM_LDFLAGS += $(EXTRA_LDFLAGS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue