Browse Source

package/linux-pam: needs gcc >= 4.9

linux-pam raises the following build failure with gcc 4.8 since bump to
version 1.5.3 in commit f8147e27cdac8f998ec6644a09ce4e8d62b6433c and
https://github.com/linux-pam/linux-pam/commit/8f9816b57e3a475fc2d2cbb106c188b778098f85:

pam_access.c: In function 'pam_sm_authenticate':
pam_access.c:1084:13: error: 'for' loop initial declarations are only allowed in C99 mode
             for (int i = 0; filename_list[i] != NULL; i++) {
             ^

Those build failures could be fixed by adding -std=c99 but then the
build will fails because stdadtomic.h is mandatory since
https://github.com/linux-pam/linux-pam/commit/a35e092e24ee7632346a0e1b4a203c04d4cd2c62

Fixes:
 - http://autobuild.buildroot.org/results/9b2ba987d2c873f4a7caea72707acb655279d16b

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Fabrice Fontaine 1 year ago
parent
commit
c77e25c3f1

+ 3 - 2
package/linux-pam/Config.in

@@ -4,6 +4,7 @@ config BR2_PACKAGE_LINUX_PAM
 	depends on BR2_USE_WCHAR
 	depends on BR2_USE_WCHAR
 	depends on !BR2_STATIC_LIBS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
 	select BR2_PACKAGE_FLEX
 	select BR2_PACKAGE_FLEX
 	help
 	help
 	  A Security Framework that Provides Authentication for
 	  A Security Framework that Provides Authentication for
@@ -11,7 +12,7 @@ config BR2_PACKAGE_LINUX_PAM
 
 
 	  http://linux-pam.org
 	  http://linux-pam.org
 
 
-comment "linux-pam needs a toolchain w/ wchar, locale, dynamic library"
+comment "linux-pam needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_USE_MMU
 	depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR \
 	depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

+ 3 - 2
package/nodm/Config.in

@@ -4,6 +4,7 @@ config BR2_PACKAGE_NODM
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on (BR2_ENABLE_LOCALE && BR2_USE_WCHAR) # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
 	depends on BR2_USE_MMU # linux-pam
 	depends on BR2_USE_MMU # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_XLIB_LIBX11
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	help
@@ -17,7 +18,7 @@ config BR2_PACKAGE_NODM
 
 
 	  https://github.com/spanezz/nodm/
 	  https://github.com/spanezz/nodm/
 
 
-comment "nodm needs a toolchain w/ wchar, locale, dynamic library"
+comment "nodm needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_PACKAGE_XORG7
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

+ 3 - 2
package/openvmtools/Config.in

@@ -32,13 +32,14 @@ config BR2_PACKAGE_OPENVMTOOLS_PAM
 	bool "PAM support"
 	bool "PAM support"
 	# linux-pam needs locale and wchar, but we already have this
 	# linux-pam needs locale and wchar, but we already have this
 	# dependency on the main symbol, above.
 	# dependency on the main symbol, above.
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	depends on !BR2_STATIC_LIBS
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	help
 	  Support for PAM in openvmtools
 	  Support for PAM in openvmtools
 
 
-comment "PAM support needs a toolchain w/ dynamic library"
-	depends on BR2_STATIC_LIBS
+comment "PAM support needs a toolchain w/ dynamic library, gcc >= 4.9"
+	depends on BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 
 config BR2_PACKAGE_OPENVMTOOLS_RESOLUTIONKMS
 config BR2_PACKAGE_OPENVMTOOLS_RESOLUTIONKMS
 	bool "resolutionkms support"
 	bool "resolutionkms support"

+ 3 - 2
package/php-pam/Config.in

@@ -4,13 +4,14 @@ config BR2_PACKAGE_PHP_PAM
 	depends on BR2_USE_WCHAR # linux-pam
 	depends on BR2_USE_WCHAR # linux-pam
 	depends on BR2_USE_MMU # linux-pam
 	depends on BR2_USE_MMU # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
 	depends on !BR2_STATIC_LIBS # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	help
 	  PHP PAM (Pluggable Authentication Modules) integration
 	  PHP PAM (Pluggable Authentication Modules) integration
 
 
 	  https://pecl.php.net/package/PAM
 	  https://pecl.php.net/package/PAM
 
 
-comment "php-pam needs a toolchain w/ wchar, locale, dynamic library"
+comment "php-pam needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_USE_MMU
 	depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR \
 	depends on !BR2_ENABLE_LOCALE || !BR2_USE_WCHAR \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9

+ 7 - 4
package/rsh-redone/Config.in

@@ -19,11 +19,13 @@ config BR2_PACKAGE_RSH_REDONE_RLOGIND
 	depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR
 	depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR
 	depends on !BR2_TOOLCHAIN_USES_MUSL
 	depends on !BR2_TOOLCHAIN_USES_MUSL
 	depends on BR2_USE_MMU # linux-pam
 	depends on BR2_USE_MMU # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 
 
-comment "rlogind needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library"
+comment "rlogind needs a uClibc or glibc toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
-		|| BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL
+		|| BR2_STATIC_LIBS || BR2_TOOLCHAIN_USES_MUSL || \
+		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 
 config BR2_PACKAGE_RSH_REDONE_RSH
 config BR2_PACKAGE_RSH_REDONE_RSH
 	bool "rsh"
 	bool "rsh"
@@ -33,10 +35,11 @@ config BR2_PACKAGE_RSH_REDONE_RSHD
 	depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR
 	depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR
 	depends on !BR2_STATIC_LIBS
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # linux-pam
 	depends on BR2_USE_MMU # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 
 
-comment "rshd needs a toolchain w/ wchar, locale, dynamic library"
+comment "rshd needs a toolchain w/ wchar, locale, dynamic library, gcc >= 4.9"
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
 	depends on !(BR2_ENABLE_LOCALE && BR2_USE_WCHAR) \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 
 endif
 endif

+ 4 - 2
package/shadow/Config.in

@@ -20,14 +20,16 @@ config BR2_PACKAGE_SHADOW_ACCOUNT_TOOLS_SETUID
 	depends on BR2_ENABLE_LOCALE  # linux-pam
 	depends on BR2_ENABLE_LOCALE  # linux-pam
 	depends on BR2_USE_WCHAR  # linux-pam
 	depends on BR2_USE_WCHAR  # linux-pam
 	depends on !BR2_STATIC_LIBS  # linux-pam
 	depends on !BR2_STATIC_LIBS  # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	select BR2_PACKAGE_LINUX_PAM
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	help
 	  Install the user and group management tools (e.g. groupadd)
 	  Install the user and group management tools (e.g. groupadd)
 	  with setuid and authenticate the callers via PAM.
 	  with setuid and authenticate the callers via PAM.
 
 
-comment "account-tools-setuid needs a toolchain w/ dynamic library, wchar, locale"
+comment "account-tools-setuid needs a toolchain w/ dynamic library, wchar, locale, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_USE_MMU
-	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || !BR2_ENABLE_LOCALE
+	depends on BR2_STATIC_LIBS || !BR2_USE_WCHAR || \
+		!BR2_ENABLE_LOCALE || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 
 config BR2_PACKAGE_SHADOW_UTMPX
 config BR2_PACKAGE_SHADOW_UTMPX
 	bool "utmpx"
 	bool "utmpx"