Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/linux-pam: needs gcc >= 4.9
@ 2023-09-16 13:54 Fabrice Fontaine
  2023-09-30 10:20 ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2023-09-16 13:54 UTC (permalink / raw)
  To: buildroot
  Cc: Ezequiel Garcia, Raphael Pavlidis, Hervé Codina,
	Karoly Kasza, Fabrice Fontaine

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>
---
 package/linux-pam/Config.in   |  5 +++--
 package/nodm/Config.in        |  5 +++--
 package/openvmtools/Config.in |  5 +++--
 package/php-pam/Config.in     |  5 +++--
 package/rsh-redone/Config.in  | 11 +++++++----
 package/shadow/Config.in      |  6 ++++--
 6 files changed, 23 insertions(+), 14 deletions(-)

diff --git a/package/linux-pam/Config.in b/package/linux-pam/Config.in
index 27ba55bd61..b17716f2f7 100644
--- a/package/linux-pam/Config.in
+++ b/package/linux-pam/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_LINUX_PAM
 	depends on BR2_USE_WCHAR
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C11/stdatomic.h
 	select BR2_PACKAGE_FLEX
 	help
 	  A Security Framework that Provides Authentication for
@@ -11,7 +12,7 @@ config BR2_PACKAGE_LINUX_PAM
 
 	  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_ENABLE_LOCALE || !BR2_USE_WCHAR \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/nodm/Config.in b/package/nodm/Config.in
index 2dd6f1e1cf..52fd031b9b 100644
--- a/package/nodm/Config.in
+++ b/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_STATIC_LIBS # 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_LINUX_PAM
 	help
@@ -17,7 +18,7 @@ config BR2_PACKAGE_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_ENABLE_LOCALE && BR2_USE_WCHAR) \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/openvmtools/Config.in b/package/openvmtools/Config.in
index 67855f50e0..066a7a4736 100644
--- a/package/openvmtools/Config.in
+++ b/package/openvmtools/Config.in
@@ -32,13 +32,14 @@ config BR2_PACKAGE_OPENVMTOOLS_PAM
 	bool "PAM support"
 	# linux-pam needs locale and wchar, but we already have this
 	# dependency on the main symbol, above.
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # linux-pam
 	depends on !BR2_STATIC_LIBS
 	select BR2_PACKAGE_LINUX_PAM
 	help
 	  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
 	bool "resolutionkms support"
diff --git a/package/php-pam/Config.in b/package/php-pam/Config.in
index 70f62a3180..c91fa8b6fe 100644
--- a/package/php-pam/Config.in
+++ b/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_MMU # 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
 	help
 	  PHP PAM (Pluggable Authentication Modules) integration
 
 	  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_ENABLE_LOCALE || !BR2_USE_WCHAR \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
diff --git a/package/rsh-redone/Config.in b/package/rsh-redone/Config.in
index 53ff2bea7f..fed643def4 100644
--- a/package/rsh-redone/Config.in
+++ b/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_TOOLCHAIN_USES_MUSL
 	depends on BR2_USE_MMU # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # 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) \
-		|| 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
 	bool "rsh"
@@ -33,10 +35,11 @@ config BR2_PACKAGE_RSH_REDONE_RSHD
 	depends on BR2_ENABLE_LOCALE && BR2_USE_WCHAR
 	depends on !BR2_STATIC_LIBS
 	depends on BR2_USE_MMU # linux-pam
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # 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) \
-		|| BR2_STATIC_LIBS
+		|| BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 
 endif
diff --git a/package/shadow/Config.in b/package/shadow/Config.in
index e3580c2cf5..e85e5884d2 100644
--- a/package/shadow/Config.in
+++ b/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_USE_WCHAR  # 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
 	help
 	  Install the user and group management tools (e.g. groupadd)
 	  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_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
 	bool "utmpx"
-- 
2.40.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/linux-pam: needs gcc >= 4.9
  2023-09-16 13:54 [Buildroot] [PATCH 1/1] package/linux-pam: needs gcc >= 4.9 Fabrice Fontaine
@ 2023-09-30 10:20 ` Peter Korsgaard
  2023-10-12 16:47   ` Peter Korsgaard
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2023-09-30 10:20 UTC (permalink / raw)
  To: Fabrice Fontaine
  Cc: Karoly Kasza, Hervé Codina, Ezequiel Garcia,
	Raphael Pavlidis, buildroot

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:

 > 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>

Committed, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH 1/1] package/linux-pam: needs gcc >= 4.9
  2023-09-30 10:20 ` Peter Korsgaard
@ 2023-10-12 16:47   ` Peter Korsgaard
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2023-10-12 16:47 UTC (permalink / raw)
  To: Fabrice Fontaine
  Cc: Hervé Codina, Karoly Kasza, Ezequiel Garcia,
	Raphael Pavlidis, buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

>>>>> "Fabrice" == Fabrice Fontaine <fontaine.fabrice@gmail.com> writes:
 >> 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>

 > Committed, thanks.

Committed to 2023.08.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-10-12 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-16 13:54 [Buildroot] [PATCH 1/1] package/linux-pam: needs gcc >= 4.9 Fabrice Fontaine
2023-09-30 10:20 ` Peter Korsgaard
2023-10-12 16:47   ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox