------------------------------------------------------------ revno: 13059 revision-id: squid3@treenet.co.nz-20131219075503-asyb4r2s319xz91v parent: squid3@treenet.co.nz-20131215053333-un57sms1p98rw48t committer: Amos Jeffries branch nick: 3.4 timestamp: Thu 2013-12-19 00:55:03 -0700 message: Fix linker errors "relocation R_X86_64_32 against .rodata" ... "can not be used when making a shared object; recompile with -fPIC" Caused by some libraries built without libtool in certain environments. NP: there are other libraries in Squid built without libtool but they appear not to be having these linker issues at this time. Also, fixes "undefined symbol eui64_aton" uncovered by these changes. ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20131219075503-asyb4r2s319xz91v # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # testament_sha1: 038c1d44abfc1ab582de30a18b183fbe51f9b8c9 # timestamp: 2013-12-19 08:53:39 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.4 # base_revision_id: squid3@treenet.co.nz-20131215053333-\ # un57sms1p98rw48t # # Begin patch === modified file 'compat/Makefile.am' --- compat/Makefile.am 2012-10-08 08:40:01 +0000 +++ compat/Makefile.am 2013-12-19 07:55:03 +0000 @@ -9,8 +9,8 @@ # Port Specific Configurations -noinst_LIBRARIES = libcompat-squid.a -libcompat_squid_a_SOURCES = \ +noinst_LTLIBRARIES = libcompat-squid.la +libcompat_squid_la_SOURCES = \ assert.cc \ assert.h \ cmsg.h \ @@ -23,6 +23,7 @@ debug.h \ drand48.h \ eui64_aton.h \ + eui64_aton.c \ fdsetsize.h \ getaddrinfo.h \ getnameinfo.h \ @@ -74,7 +75,7 @@ os/solaris.h \ os/sunos.h -libcompat_squid_a_LIBADD= $(LIBOBJS) +libcompat_squid_la_LIBADD= $(LIBOBJS) check_PROGRAMS += testPreCompiler TESTS += testPreCompiler === modified file 'compat/eui64_aton.c' --- compat/eui64_aton.c 2012-01-20 18:55:04 +0000 +++ compat/eui64_aton.c 2013-12-19 07:55:03 +0000 @@ -77,6 +77,8 @@ #include "squid.h" #include "compat/eui64_aton.h" +#if SQUID_EUI64_ATON + /* * Convert an ASCII representation of an EUI-64 to binary form. */ @@ -132,3 +134,5 @@ return (0); } + +#endif /* !SQUID_EUI64_ATON */ === modified file 'compat/eui64_aton.h' --- compat/eui64_aton.h 2011-08-06 03:45:38 +0000 +++ compat/eui64_aton.h 2013-12-19 07:55:03 +0000 @@ -46,6 +46,8 @@ extern "C" { #endif +#define SQUID_EUI64_ATON 1 + /** * Size of the ASCII representation of an EUI-64. */ === modified file 'configure.ac' --- configure.ac 2013-12-09 01:20:11 +0000 +++ configure.ac 2013-12-19 07:55:03 +0000 @@ -1138,7 +1138,7 @@ [Define to enable SNMP monitoring of Squid]) AM_CONDITIONAL(ENABLE_SNMP, [test "x$enable_snmp" = "xyes"]) if test "x$enable_snmp" = "xyes"; then - SNMPLIB='../snmplib/libsnmplib.a' + SNMPLIB='../snmplib/libsnmplib.la' makesnmplib=snmplib fi AC_MSG_NOTICE([SNMP support enabled: $enable_snmp]) @@ -3057,6 +3057,7 @@ bswap_32 \ bswap16 \ bswap32 \ + eui64_aton \ fchmod \ getdtablesize \ getpagesize \ @@ -3114,7 +3115,6 @@ dnl ... and some we provide local replacements for AC_REPLACE_FUNCS(\ drand48 \ - eui64_aton \ inet_ntop \ inet_pton \ initgroups \ === modified file 'snmplib/Makefile.am' --- snmplib/Makefile.am 2011-01-31 14:04:00 +0000 +++ snmplib/Makefile.am 2013-12-19 07:55:03 +0000 @@ -4,8 +4,8 @@ ## AM_CFLAGS = $(SQUID_CFLAGS) AM_CXXFLAGS = $(SQUID_CXXFLAGS) -noinst_LIBRARIES = libsnmplib.a -libsnmplib_a_SOURCES = asn1.c parse.c snmp_vars.c \ +noinst_LTLIBRARIES = libsnmplib.la +libsnmplib_la_SOURCES = asn1.c parse.c snmp_vars.c \ coexistance.c snmp_api.c snmp_error.c \ mib.c snmp_api_error.c \ snmp_msg.c \ === modified file 'src/Common.am' --- src/Common.am 2010-11-01 05:44:28 +0000 +++ src/Common.am 2013-12-19 07:55:03 +0000 @@ -43,7 +43,7 @@ endif ## Because compatibility is almost universal. And the link order is important. -COMPAT_LIB = -L$(top_builddir)/compat -lcompat-squid $(LIBPROFILER) +COMPAT_LIB = $(top_builddir)/compat/libcompat-squid.la $(LIBPROFILER) ## Some helpers are written in Perl and need the local shell defined properly subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1) === modified file 'src/Makefile.am' --- src/Makefile.am 2013-11-29 10:55:53 +0000 +++ src/Makefile.am 2013-12-19 07:55:03 +0000 @@ -940,7 +940,7 @@ # Make location configure settings available to the code DEFS += -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" -DDEFAULT_SQUID_DATA_DIR=\"$(datadir)\" -DDEFAULT_SQUID_CONFIG_DIR=\"$(sysconfdir)\" -snmp_core.o snmp_agent.o: ../snmplib/libsnmplib.a $(top_srcdir)/include/cache_snmp.h +snmp_core.o snmp_agent.o: ../snmplib/libsnmplib.la $(top_srcdir)/include/cache_snmp.h globals.cc: globals.h mk-globals-c.awk $(AWK) -f $(srcdir)/mk-globals-c.awk < $(srcdir)/globals.h > $@ || ($(RM) -f $@ && exit 1)