Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lmich
amanda
amanda-2.6.0-fpie.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File amanda-2.6.0-fpie.patch of Package amanda
--- client-src/Makefile.am +++ client-src/Makefile.am @@ -20,6 +20,17 @@ amlibexec_PROGRAMS = noop calcsize killpgrp rundump runtar selfcheck sendbackup sendsize versionsuffix +calcsize_CFLAGS = -fPIE $(AM_CFLAGS) +calcsize_LDFLAGS = -pie $(AM_LDFLAGS) +killpgrp_CFLAGS = -fPIE $(AM_CFLAGS) +killpgrp_LDFLAGS = -pie $(AM_LDFLAGS) +rundump_CFLAGS = -fPIE $(AM_CFLAGS) +rundump_LDFLAGS = -pie $(AM_LDFLAGS) +runtar_CFLAGS = -fPIE $(AM_CFLAGS) +runtar_LDFLAGS = -pie $(AM_LDFLAGS) +amandad_CFLAGS = -fPIE $(AM_CFLAGS) +amandad_LDFLAGS = -pie $(AM_LDFLAGS) + sbin_SCRIPTS = @CLIENT_SCRIPTS_OPT@ EXTRA_SCRIPTS = amhpfixdevs amsinixfixdevs @@ -35,6 +46,7 @@ libamclient_la_SOURCES += findpass.c endif +libamclient_la_CFLAGS = -fPIC $(AM_CFLAGS) libamclient_la_LDFLAGS = -release $(VERSION) ### --- configure.in +++ configure.in @@ -34,6 +34,54 @@ AMANDA_INIT_FLAGS AMANDA_ADD_CPPFLAGS([-D_GNU_SOURCE]) +AC_MSG_CHECKING([for Position Independent Executable support]) +save_CFLAGS="$CFLAGS" +save_LDFLAGS="$LDFLAGS" +CFLAGS="$CFLAGS -fpie" +LDFLAGS="$LDFLAGS -pie" +AC_TRY_RUN( + [ +int foo () __attribute__((visibility ("hidden"))); +int foo () { return 0; } +int main () { return foo (); } + ], + [ + ac_cv_pie_support=yes + ], + [ + ac_cv_pie_support=no + ], + [ + ac_cv_pie_support=no + ] +) +CFLAGS="$save_CFLAGS" +LDFLAGS="$save_LDFLAGS" +AC_MSG_RESULT($ac_cv_pie_support) +if test $ac_cv_pie_support = no; then + AC_DEFINE(hidden,, + [Define as `__attribute__((visibility ("hidden")))' if the C compiler supports it, + or to nothing if it is not supported.]) + PIE_LDFLAGS= + PIE_SED_CMD= + COMPILE_PIE= + EXIT0_IF_NO_PIE='exit 0' +else + AC_DEFINE_UNQUOTED(hidden, __attribute__((visibility ("hidden")))) + PIE_LDFLAGS="-pie -L.pie/ -Lopenbsd-compat/.pie/" +changequote(<<, >>)dnl + PIE_SED_CMD='s_[ ]\([^ ]\)_ .pie/\1_g' +changequote([, ])dnl + COMPILE_PIE=' && mkdir -p .pie && $(COMPILE) -c -fpie -o .pie/$@ \`test -f '"'"'$<'"'"' || echo '"'"'$(srcdir)/'"'"'\`$<' + EXIT0_IF_NO_PIE=: +fi +AC_SUBST(PIE_LDFLAGS) +AC_SUBST(PIE_SED_CMD) +AC_SUBST(COMPILE_PIE) +AC_SUBST(EXIT0_IF_NO_PIE) + + + dnl ------------------------------------------------------------------------- # --- server-src/Makefile.am +++ server-src/Makefile.am @@ -20,6 +20,20 @@ amlib_LTLIBRARIES = libamserver.la +amcheck_CFLAGS = -fPIE $(AM_CFLAGS) +amcheck_LDFLAGS = -pie $(AM_LDFLAGS) +amindexd_CFLAGS = -fPIE $(AM_CFLAGS) +amindexd_LDFLAGS = -pie $(AM_LDFLAGS) +dumper_CFLAGS = -fPIE $(AM_CFLAGS) +dumper_LDFLAGS = -pie $(AM_LDFLAGS) +planner_CFLAGS = -fPIE $(AM_CFLAGS) +planner_LDFLAGS = -pie $(AM_LDFLAGS) +libamserver_la_CFLAGS = -fPIC $(AM_CFLAGS) +amdd_CFLAGS = -fPIE $(AM_CFLAGS) +amdd_LDFLAGS = -pie $(AM_LDFLAGS) +libamtape_la_CFLAGS = -fPIC $(AM_CFLAGS) + + sbin_PROGRAMS = amadmin amcheck \ amflush amgetconf amlabel \ amtape amreport --- tape-src/Makefile.am +++ tape-src/Makefile.am @@ -23,7 +23,15 @@ output-tape.c \ tapeio.c -libamtape_la_LDFLAGS = -release $(VERSION) +libamtape_la_CFLAGS = -fPIE $(AM_CFLAGS) +amdd_CFLAGS = -fPIE $(AM_CFLAGS) +ammt_CFLAGS = -fPIE $(AM_CFLAGS) +amtapetype_CFLAGS = -fPIE $(AM_CFLAGS) + +libamtape_la_LDFLAGS = -pie $(AM_LDFLAGS) -release $(VERSION) +amdd_LDFLAGS = -pie $(AM_LDFLAGS) +ammt_LDFLAGS = -pie $(AM_LDFLAGS) +amtapetype_LDFLAGS = -pie $(AM_LDFLAGS) ### # Because libamanda includes routines (e.g. regex) provided by some system
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor