net-snmp: fix compile errors
git-svn-id: svn://svn.openwrt.org/openwrt/packages@18076 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
55b3bcf5a6
commit
6ea2de9eef
@ -175,22 +175,23 @@ SNMP_TRANSPORTS_INCLUDED+= UDPIPv6
|
||||
CONFIGURE_ARGS+= --enable-ipv6
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
mkdir -p $(PKG_INSTALL_DIR)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) -lm" \
|
||||
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-shared; )
|
||||
#ifneq ($(CONFIG_PACKAGE_snmpd-static),)
|
||||
( cd $(PKG_BUILD_DIR); rm -f agent/snmpd; )
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
TARGET_LDFLAGS += -L$(TOOLCHAIN_DIR)/usr/lib
|
||||
|
||||
ifdef CONFIG_PACKAGE_snmpd-static
|
||||
define Build/Compile/static
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/agent \
|
||||
LDFLAGS="$(TARGET_LDFLAGS) -lm -static" \
|
||||
EXEEXT="-static" \
|
||||
snmpd-static
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
INSTALL_PREFIX="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
( cd $(PKG_INSTALL_DIR); mv ./usr/sbin/snmpd ./usr/sbin/snmpd-static; )
|
||||
#endif
|
||||
LDFLAGS="$(TARGET_LDFLAGS) -lm -lc" \
|
||||
all install
|
||||
$(Build/Compile/static)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
@ -224,7 +225,7 @@ define Package/snmpd/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd-shared $(1)/usr/sbin/snmpd
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd $(1)/usr/sbin/snmpd
|
||||
endef
|
||||
|
||||
define Package/snmpd-static/conffiles
|
||||
@ -242,7 +243,7 @@ define Package/snmpd-static/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/snmpd.init $(1)/etc/init.d/snmpd
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/snmpd-static $(1)/usr/sbin/snmpd
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/agent/snmpd-static $(1)/usr/sbin/snmpd
|
||||
endef
|
||||
|
||||
define Package/snmp-utils/install
|
||||
|
11
libs/net-snmp/patches/170-ldflags.patch
Normal file
11
libs/net-snmp/patches/170-ldflags.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/Makefile.top
|
||||
+++ b/Makefile.top
|
||||
@@ -81,7 +81,7 @@ LIBCURRENT = 16
|
||||
LIBAGE = 1
|
||||
LIBREVISION = 2
|
||||
|
||||
-LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
|
||||
+LIB_LD_CMD = $(LIBTOOL) --mode=link $(LINKCC) $(CFLAGS) -rpath $(libdir) $(LDFLAGS) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
|
||||
LIB_EXTENSION = la
|
||||
LIB_VERSION =
|
||||
LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)
|
Loading…
x
Reference in New Issue
Block a user