All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Serhii Popovych <spopovyc@cisco.com>,
	openembedded-core@lists.openembedded.org
Cc: XE-Linux <xe-linux-external@cisco.com>
Subject: Re: [PATCH] glibc: Support building with 2.6.32 kernels on x86 / x86_64
Date: Tue, 28 Mar 2017 23:26:24 +0100	[thread overview]
Message-ID: <1490739984.13980.294.camel@linuxfoundation.org> (raw)
In-Reply-To: <4713eca3e627fb1bececc59af252a0768c955d11.1490727266.git.spopovyc@cisco.com>

On Tue, 2017-03-28 at 18:57 +0000, Serhii Popovych wrote:
> While glibc states that 2.6.32 kernels still supported
> for x86 / x86_64 builds are failing due to out of date
> LIBC_LINUX_VERSION macro checks for such architectures.
> 
> This macro statically defined to 3.2.0 with commit 5b4ecd3
> (Require Linux 3.2 except on x86 / x86_64, 3.2 headers everywhere.)
> and additionally checked before --enable-kernel.
> 
> Since both --enable-kernel and LIBC_LINUX_VERSION checks
> are the same and there is no users of last one we can
> safely get rid of it enabling glibc builds with 2.6.32
> kernel headers.
> 
> Also add --enable-kernel to glibc-initial build so that we
> build it correctly with old headers.
> 
> Cc: XE-Linux <xe-linux-external@cisco.com>
> Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
> ---
>  meta/recipes-core/glibc/glibc-initial.inc          |   1 +
>  .../glibc/0028-Kill-LIBC_LINUX_VERSION-macro.patch | 113
> +++++++++++++++++++++
>  meta/recipes-core/glibc/glibc_2.25.bb              |   1 +
>  3 files changed, 115 insertions(+)
>  create mode 100644 meta/recipes-core/glibc/glibc/0028-Kill-
> LIBC_LINUX_VERSION-macro.patch
> 
> diff --git a/meta/recipes-core/glibc/glibc-initial.inc
> b/meta/recipes-core/glibc/glibc-initial.inc
> index f94603c..60b25dd 100644
> --- a/meta/recipes-core/glibc/glibc-initial.inc
> +++ b/meta/recipes-core/glibc/glibc-initial.inc
> @@ -12,6 +12,7 @@ do_configure () {
>  	find ${S} -name "configure" | xargs touch
>  	cfgscript=`python3 -c "import os;
> print(os.path.relpath('${S}', '.'))"`/configure
>  	$cfgscript --host=${TARGET_SYS} --build=${BUILD_SYS} \
> +		--enable-kernel=${OLDEST_KERNEL} \
>  		--prefix=/usr \
>  		--without-cvs --disable-sanity-checks \
>  		--with-headers=${STAGING_DIR_TARGET}${includedir} \
> diff --git a/meta/recipes-core/glibc/glibc/0028-Kill-
> LIBC_LINUX_VERSION-macro.patch b/meta/recipes-core/glibc/glibc/0028-
> Kill-LIBC_LINUX_VERSION-macro.patch
> new file mode 100644
> index 0000000..f5eaf1c
> --- /dev/null
> +++ b/meta/recipes-core/glibc/glibc/0028-Kill-LIBC_LINUX_VERSION-
> macro.patch
> @@ -0,0 +1,113 @@
> +From 88f83e4b5a8929dac9095ed264700fcb62d5e4dd Mon Sep 17 00:00:00
> 2001
> +From: Serhii Popovych <spopovyc@cisco.com>
> +Date: Fri, 17 Mar 2017 15:48:34 +0000
> +Subject: Kill LIBC_LINUX_VERSION macro
> +
> +After commit 5b4ecd3 (Require Linux 3.2 except on x86 / x86_64,
> +3.2 headers everywhere.) minimal kernel version raised from
> +2.6.32 to 3.2.0 for all architectures except x86 and x86_64
> +unless newer already used for architecture.
> +
> +However LIBC_LINUX_VERSION macro still is in effect and fails
> +configure even with --enable-kernel=2.6.32.
> +
> +While it is present in configure.ac it does not affect anything
> +except LINUX_VERSION_CODE check which already performed by
> +--enable-kernel.
> +
> +Upstream-Status: Pending
> +Signed-off-by: Serhii Popovych <spopovyc@cisco.com>
> +---
> + sysdeps/unix/sysv/linux/configure    | 39 -----------------------
> -------------
> + sysdeps/unix/sysv/linux/configure.ac | 21 -------------------
> + 2 files changed, 60 deletions(-)
> +
> +diff --git a/sysdeps/unix/sysv/linux/configure
> b/sysdeps/unix/sysv/linux/configure

This is presumably a generated file. We should only patch configure.ac
as otherwise the potential timestamp differences between these can
cause problems (we've been burnt before). The configure version will
get updated when we reautoconf.

Cheers,

Richard


  reply	other threads:[~2017-03-28 22:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 18:57 [PATCH] glibc: Support building with 2.6.32 kernels on x86 / x86_64 Serhii Popovych
2017-03-28 22:26 ` Richard Purdie [this message]
2017-03-29 11:27   ` Serhii Popovych
2017-03-29  0:03 ` Khem Raj
2017-03-29  9:57   ` Serhii Popovych
2017-03-31 10:41     ` Serhii Popovych
2017-03-31 15:19       ` Serhii Popovych
2017-03-29 10:00   ` Serhii Popovych

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490739984.13980.294.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=spopovyc@cisco.com \
    --cc=xe-linux-external@cisco.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.