From 473d98a9cffea603ccc3ab62a0872e0058524eb3 Mon Sep 17 00:00:00 2001 From: Alexey Yakovenko Date: Tue, 3 Dec 2013 22:02:45 +0100 Subject: build system fixes for 0.6 static --- PORTABLE_BUILD | 2 +- configure.ac | 19 +++++++++++-------- plugins/gme/Makefile.am | 2 +- plugins/gtkui/Makefile.am | 6 +++--- plugins/supereq/Makefile.am | 2 +- plugins/vorbis/Makefile.am | 4 ++-- scripts/static_build.sh | 1 + tools/apbuild/apsymbols.h.x86_64 | 4 ++++ tools/packages/debian.sh | 2 ++ 9 files changed, 26 insertions(+), 16 deletions(-) diff --git a/PORTABLE_BUILD b/PORTABLE_BUILD index 0cfbf088..b8626c4c 100644 --- a/PORTABLE_BUILD +++ b/PORTABLE_BUILD @@ -1 +1 @@ -2 +4 diff --git a/configure.ac b/configure.ac index 71d48544..3023cc20 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([deadbeef], [0.6.0]) +AC_INIT([deadbeef], [devel]) AC_CONFIG_HEADER(config.h) @@ -27,11 +27,6 @@ AC_SUBST(GETTEXT_PACKAGE) test "$prefix" = NONE && prefix=/usr/local AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Name of gettext locale directory]) -case "$host" in - *-*-gnu) - NOCPPLIB="-nostdlib -lsupc++";; -esac - case "$host" in i686-apple-*) AC_DEFINE(ARCH_X86_32, 1, [architecture is x86 on OSX]) @@ -58,7 +53,6 @@ case "$host" in LIB="../deadbeef-deps/lib-x86-64" YASM_FLAGS="-f elf -D ARCH_X86_64 -m amd64" APE_USE_YASM=yes - KILLCPPFLAGS="-nostdlib -lsupc++" ;; powerpc-*-* ) AC_DEFINE(ARCH_PPC_32, 1, [architecture is ppc32]) @@ -72,10 +66,19 @@ case "$host" in AC_DEFINE(ARCH_UNKNOWN, 1, [architecture is unknown]) ;; esac -AC_SUBST(NOCPPLIB) AC_SUBST(LIB) AC_SUBST(YASM_FLAGS) +case "$host" in + *-*-gnu) + AS_IF([test "${enable_staticlink}" != "no"], [ + NOCPPLIB="-nostdlib ../../$LIB/lib/libsupc++.a" + ], [ + NOCPPLIB="-nostdlib -lsupc++" + ]);; +esac +AC_SUBST(NOCPPLIB) + test "x$prefix" = xNONE && prefix=$ac_default_prefix dnl INSANE_CFLAGS="-Wformat -Wdisabled-optimization -Wcomment -Wchar-subscripts -Wunused-function -Wunused-value -Wuninitialized -Wtype-limits -Wbad-function-cast" diff --git a/plugins/gme/Makefile.am b/plugins/gme/Makefile.am index 9c789c38..ea2e77b2 100644 --- a/plugins/gme/Makefile.am +++ b/plugins/gme/Makefile.am @@ -402,5 +402,5 @@ gme_la_LDFLAGS = -module $(NOCPPLIB) gme_la_LIBADD = $(ZLIB_LIBS) AM_CFLAGS = $(CFLAGS) $(ZLIB_CFLAGS) -I$(gmepath) -std=c99 -DGME_VERSION_055 -AM_CPPFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables +AM_CPPFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -fno-unwind-tables endif diff --git a/plugins/gtkui/Makefile.am b/plugins/gtkui/Makefile.am index f6c30c75..afce48f5 100644 --- a/plugins/gtkui/Makefile.am +++ b/plugins/gtkui/Makefile.am @@ -54,8 +54,8 @@ sdk_HEADERS = gtkui_api.h EXTRA_DIST = deadbeef.glade -GTKGLEXT2_LIBS = -lGL -lGLU -GTKGLEXT3_LIBS = +#GTKGLEXT2_LIBS = +#GTKGLEXT3_LIBS = if STATICLINK if HAVE_GTK2 @@ -149,7 +149,7 @@ GTKUI_SOURCES_GTK2 = $(GTKUI_SOURCES) # gtkglext-gtk2/gdk/glext/glxext-extra.h\ # gtkglext-gtk2/gdk/glext/glxext.h -GTKGLEXT_CFLAGS_GTK2 = -I@top_srcdir@/plugins/gtkui/gtkglext-gtk2 -I@top_srcdir@/plugins/gtkui/gtkglext-gtk2/gdk -DGTK_GL_COMPILATION -DGDK_GL_COMPILATION +#GTKGLEXT_CFLAGS_GTK2 = -I@top_srcdir@/plugins/gtkui/gtkglext-gtk2 -I@top_srcdir@/plugins/gtkui/gtkglext-gtk2/gdk -DGTK_GL_COMPILATION -DGDK_GL_COMPILATION ddb_gui_GTK2_la_SOURCES = $(GTKUI_SOURCES_GTK2) ddb_gui_GTK2_la_LDFLAGS = -module diff --git a/plugins/supereq/Makefile.am b/plugins/supereq/Makefile.am index 86abe308..0daa9577 100644 --- a/plugins/supereq/Makefile.am +++ b/plugins/supereq/Makefile.am @@ -4,7 +4,7 @@ pkglib_LTLIBRARIES = supereq.la supereq_la_SOURCES = supereq.c Equ.cpp Equ.h Fftsg_fl.c paramlist.hpp AM_CFLAGS = $(CFLAGS) -std=c99 -DUSE_OOURA -AM_CPPFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -nostdlib -fno-unwind-tables -DUSE_OOURA +AM_CPPFLAGS = $(CXXFLAGS) -fno-exceptions -fno-rtti -fno-unwind-tables -DUSE_OOURA supereq_la_LDFLAGS = -module $(NOCPPLIB) diff --git a/plugins/vorbis/Makefile.am b/plugins/vorbis/Makefile.am index 6580db14..8587e54a 100644 --- a/plugins/vorbis/Makefile.am +++ b/plugins/vorbis/Makefile.am @@ -2,8 +2,8 @@ if HAVE_VORBIS vorbisdir = $(libdir)/$(PACKAGE) pkglib_LTLIBRARIES = vorbis.la vorbis_la_SOURCES = vorbis.c vcedit.c vcedit.h vceditaux.h i18n.h -vorbis_la_LDFLAGS = -module +vorbis_la_LDFLAGS = -module -lm -vorbis_la_LIBADD = $(LDADD) $(VORBIS_LIBS) -lc +vorbis_la_LIBADD = $(LDADD) $(VORBIS_LIBS) AM_CFLAGS = $(CFLAGS) -std=c99 endif diff --git a/scripts/static_build.sh b/scripts/static_build.sh index a4c9e9dd..9b8937d7 100755 --- a/scripts/static_build.sh +++ b/scripts/static_build.sh @@ -9,6 +9,7 @@ cd tools/apbuild cd ../../ export APBUILD_STATIC_LIBGCC=1 +export APBUILD_CXX1=1 export CC=$AP/apgcc export CXX=$AP/apgcc diff --git a/tools/apbuild/apsymbols.h.x86_64 b/tools/apbuild/apsymbols.h.x86_64 index cf3dfb36..3ab2c8c4 100644 --- a/tools/apbuild/apsymbols.h.x86_64 +++ b/tools/apbuild/apsymbols.h.x86_64 @@ -6,6 +6,10 @@ APBUILD_NOTE_METADATA("apbuild.version=" APBUILD_VERSION); #endif /* apbuild generated symbol exclusion list */ +__asm__(".symver __exp_finite,exp@GLIBC_2.2.5"); +__asm__(".symver __acosf_finite,acosf@GLIBC_2.2.5"); +__asm__(".symver __log_finite,log@GLIBC_2.2.5"); +__asm__(".symver __pow_finite,pow@GLIBC_2.2.5"); __asm__(".symver memcpy,memcpy@GLIBC_2.2.5"); __asm__(".symver clnt_pcreateerror,clnt_pcreateerror@GLIBC_2.2.5"); __asm__(".symver clnt_spcreateerror,clnt_spcreateerror@GLIBC_2.2.5"); diff --git a/tools/packages/debian.sh b/tools/packages/debian.sh index 05ba1414..58d02602 100755 --- a/tools/packages/debian.sh +++ b/tools/packages/debian.sh @@ -72,6 +72,8 @@ done # archive control cd $TEMPDIR +chmod 644 control md5sums shlibs +chmod 755 postrm postinst fakeroot -- tar zcvf ./control.tar.gz ./control ./md5sums ./postrm ./postinst ./shlibs # archive data fakeroot -- tar zcvf ./data.tar.gz ./opt ./usr -- cgit v1.2.3