Skip to contentSkip to conversation

package/glibc: fix usage of BR2_PACKAGE_GLIBC_KERNEL_COMPAT

PATCH In review Guillaume Smaha 2 participants 3 messages Sep 2, 2022 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/glibc: fix usage of BR2_PACKAGE_GLIBC_KERNEL_COMPAT

As explain in the commit 525ffc2bb17fa11fc128124d2d3a92d8698eaab8:
"Say 'y' here if you plan on running your system on a kernel older than the version used for the toolchain headers."

---
 package/glibc/glibc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/glibc/glibc.mk +1 -1
index 5af539ca62..4e4417b45a 100644
@@ -98,7 +98,7 @@ endif
 GLIBC_MAKE = $(BR2_MAKE)
 GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"
 
-ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),)
+ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),y)
 GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))
 endif
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Guillaume, All,

On 2022-09-02 12:34 +0200, Guillaume Smaha spake thusly:

Quoted 14 lines

As explain in the commit 525ffc2bb17fa11fc128124d2d3a92d8698eaab8:
"Say 'y' here if you plan on running your system on a kernel older than the version used for the toolchain headers."

---
 package/glibc/glibc.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/glibc/glibc.mk +0 -0
index 5af539ca62..4e4417b45a 100644

package/glibc/glibc.mk endif · line 101

Quoted 5 lines
package/glibc/glibc.mk +1 -1
@@ -98,7 +98,7 @@ endif
 GLIBC_MAKE = $(BR2_MAKE)
 GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"
 
-ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),)
+ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),y)

You may have gotten a bit confused, but the curent situation is exactly correct.

Indeed, when configured _without_ passing any --enable-kernel=X.Y.Z value, then glibc will enable *all* the backward compatibility wrappers.

However, when configured with --enable-kernel=X.Y.Z, then only those wrappers needed for being compatible with that version of the kernel will be used.

So, indeed, we do not want to pass --enable-kernel=X.Y.Z when BR2_PACKAGE_GLIBC_KERNEL_COMPAT is set.

For more information, see:
https://www.gnu.org/software/libc/manual/html_mono/libc.html#Configuring-and-compiling
https://github.com/bminor/glibc/blob/master/configure.ac#L273
https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/configure.ac#L30

Regards,
Yann E. MORIN.

Quoted 10 lines
package/glibc/glibc.mk +0 -0
 GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST))
 endif
 
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

A message that is not in the archive (sent off-list or not yet received): CANf9tWYT3MZGq1UKDQN95X=L077Tuu8vRjOn1E5ek7ZLvjX1kA@mail.gmail.com

#3 lore raw

Guillaume, All,

[Guillaume: please keep the list in Cc when you reply]

On 2022-09-02 14:20 +0200, Guillaume Smaha spake thusly:

Quoted 3 lines

Thanks for the explanation !
You are right, I got confused that glibc will enable all the backward compatibilitywithotu the flag.

No problem, thans for the feedback.

I've consequently marked the patch as rejected in our patchwork.

Regards,
Yann E. MORIN.

Quoted 83 lines · Yann E. MORIN

Guillaume, All,

  On 2022-09-02 12:34 +0200, Guillaume Smaha spake thusly:
  > As explain in the commit 525ffc2bb17fa11fc128124d2d3a92d8698eaab8:
  > "Say 'y' here if you plan on running your system on a kernel older than
  > the version used for the toolchain headers."
  >
  > Signed-off-by: Guillaume Smaha < [2][email protected]>
  > ---
  >  package/glibc/ [3]glibc.mk | 2 +-
  >  1 file changed, 1 insertion(+), 1 deletion(-)
  >
  > diff --git a/package/glibc/ [4]glibc.mk b/package/glibc/ [5]glibc.mk
  > index 5af539ca62..4e4417b45a 100644
  > --- a/package/glibc/ [6]glibc.mk
  > +++ b/package/glibc/ [7]glibc.mk
  > @@ -98,7 +98,7 @@ endif
  >  GLIBC_MAKE = $(BR2_MAKE)
  >  GLIBC_CONF_ENV += ac_cv_prog_MAKE="$(BR2_MAKE)"
  > 
  > -ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),)
  > +ifeq ($(BR2_PACKAGE_GLIBC_KERNEL_COMPAT),y)

You may have gotten a bit confused, but the curent situation is exactly correct.

Indeed, when configured _without_ passing any --enable-kernel=X.Y.Z value, then glibc will enable *all* the backward compatibility wrappers.

However, when configured with --enable-kernel=X.Y.Z, then only those wrappers needed for being compatible with that version of the kernel will be used.

So, indeed, we do not want to pass --enable-kernel=X.Y.Z when BR2_PACKAGE_GLIBC_KERNEL_COMPAT is set.

For more information, see:
    [8]https://www.gnu.org/software/libc/manual/html_mono/libc.html#Configuring-and-compiling [9]https://github.com/bminor/glibc/blob/master/configure.ac#L273 [10]https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/configure.ac#L30

Regards,
Yann E. MORIN.

Quoted 10 lines

  GLIBC_CONF_OPTS += --enable-kernel=$(call qstrip,$(BR2_TOOLCHAIN_HEADERS_AT_LEAST)) endif

--
2.34.1

_______________________________________________
buildroot mailing list [11][email protected] [12]https://lists.buildroot.org/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

  |  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
  | +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___           
     |
  | +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
  | [13]http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

--
Guillaume Smaha

Links:
1. mailto:[email protected]
2. mailto:[email protected]
3. http://glibc.mk
4. http://glibc.mk
5. http://glibc.mk
6. http://glibc.mk
7. http://glibc.mk
8. https://www.gnu.org/software/libc/manual/html_mono/libc.html#Configuring-and-compiling
9. https://github.com/bminor/glibc/blob/master/configure.ac#L273
10. https://github.com/bminor/glibc/blob/master/sysdeps/unix/sysv/linux/configure.ac#L30
11. mailto:[email protected]
12. https://lists.buildroot.org/mailman/listinfo/buildroot
13. http://ymorin.is-a-geek.org/

Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot