瀏覽代碼

package/sudo: drop openssl workaround

Drop workaround added by commit bf899e50d89439b1a1bdf22bc933075958ffc108
because sudo natively supports pkg-config for searching openssl (which
is enabled by default) since version 1.9.2 and
https://github.com/sudo-project/sudo/commit/4cadd549513ef35d4d740e941576294f4491d13d

As a side-effect, this will fix the following build failure when openssl
is not installed on host (as LIBS is set before AX_PROG_CC_FOR_BUILD):

configure:8162: checking whether the C compiler works
configure:8184: /usr/bin/gcc -O2 -I/home/buildroot/autobuild/instance-2/output-1/host/include -I/home/buildroot/autobuild/instance-2/output-1/host/include -L/home/buildroot/autobuild/instance-2/output-1/host/lib -Wl,-rpath,/home/buildroot/autobuild/instance-2/output-1/host/lib conftest.c -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -lssl -L/home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib -pthread -latomic -lcrypto -pthread -latomic  >&5
/usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl
/usr/bin/ld: skipping incompatible /home/buildroot/autobuild/instance-2/output-1/host/bin/../arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libssl.a when searching for -lssl
/usr/bin/ld: cannot find -lssl

Fixes:
 - http://autobuild.buildroot.org/results/7a5d4dd22343be46a5ddd1c1a1a8e1799517d564

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Fabrice Fontaine 3 年之前
父節點
當前提交
afe11e8457
共有 1 個文件被更改,包括 7 次插入7 次删除
  1. 7 7
      package/sudo/sudo.mk

+ 7 - 7
package/sudo/sudo.mk

@@ -45,17 +45,17 @@ endif
 ifeq ($(BR2_PACKAGE_OPENLDAP),y)
 SUDO_DEPENDENCIES += openldap
 SUDO_CONF_OPTS += --with-ldap
-# If we are building sudo statically and openldap was linked with openssl, then
-# when we link sudo with openldap we need to specify the openssl libs, otherwise
-# it will fail with "undefined reference" errors.
-ifeq ($(BR2_STATIC_LIBS)$(BR2_PACKAGE_OPENSSL),yy)
-SUDO_DEPENDENCIES += host-pkgconf
-SUDO_CONF_ENV += LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libssl libcrypto`"
-endif
 else
 SUDO_CONF_OPTS += --without-ldap
 endif
 
+ifeq ($(BR2_PACKAGE_OPENSSL),y)
+SUDO_DEPENDENCIES += host-pkgconf openssl
+SUDO_CONF_OPTS += --enable-openssl
+else
+SUDO_CONF_OPTS += --disable-openssl
+endif
+
 # mksigname/mksiglist needs to run on build host to generate source files
 define SUDO_BUILD_MKSIGNAME_MKSIGLIST_HOST
 	$(MAKE) $(HOST_CONFIGURE_OPTS) \