All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
@ 2015-11-21 23:18 Arnout Vandecappelle
  2015-11-21 23:18 ` [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y Arnout Vandecappelle
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-21 23:18 UTC (permalink / raw)
  To: buildroot

HOSTCC_VERSION is no longer used since gcc switched to the package
infrastructure in e236fe481. It was in fact no longer needed since we
dropped support for gcc 4.3.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Note that we currently claim to support system gcc >= 2.95, but I don't
think that matches reality...
---
 package/Makefile.in | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/package/Makefile.in b/package/Makefile.in
index 85008bb..82a66c2 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -219,10 +219,6 @@ HOST_CFLAGS   += $(HOST_CPPFLAGS)
 HOST_CXXFLAGS += $(HOST_CFLAGS)
 HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
 
-# hostcc version as an integer - E.G. 4.3.2 => 432
-HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \
-	sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
-
 # host-intltool should be executed with the system perl, so we save
 # the path to the system perl, before a host-perl built by Buildroot
 # might get installed into $(HOST_DIR)/usr/bin and therefore appears
-- 
2.6.2

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-21 23:18 [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
@ 2015-11-21 23:18 ` Arnout Vandecappelle
  2015-11-29 17:48   ` Yann E. MORIN
  2015-11-21 23:18 ` [Buildroot] [PATCH 3/3] nodejs: version 4.X needs host GCC >= 4.8 Arnout Vandecappelle
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-21 23:18 UTC (permalink / raw)
  To: buildroot

Some host packages need a recent gcc version. Add symbols to Config.in
to specify the HOSTCC version. The values are passed through the
environment, and this environment is generated in a new support script.

Also update the documentation to mention the new symbols.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 Config.in                                 | 17 ++++++++++
 Makefile                                  |  1 +
 docs/manual/adding-packages-directory.txt |  7 ++++
 support/scripts/gcc-version-variables     | 56 +++++++++++++++++++++++++++++++
 4 files changed, 81 insertions(+)
 create mode 100755 support/scripts/gcc-version-variables

diff --git a/Config.in b/Config.in
index d795361..7bec90c 100644
--- a/Config.in
+++ b/Config.in
@@ -18,6 +18,23 @@ config BR2_EXTERNAL
 	string
 	option env="BR2_EXTERNAL"
 
+# Hidden config symbols for packages to check system gcc version
+config BR2_HOST_GCC_AT_LEAST_4_7
+	bool
+	option env="HOST_GCC_AT_LEAST_4_7"
+
+config BR2_HOST_GCC_AT_LEAST_4_8
+	bool
+	option env="HOST_GCC_AT_LEAST_4_8"
+
+config BR2_HOST_GCC_AT_LEAST_4_9
+	bool
+	option env="HOST_GCC_AT_LEAST_4_9"
+
+config BR2_HOST_GCC_AT_LEAST_5
+	bool
+	option env="HOST_GCC_AT_LEAST_5"
+
 # Hidden boolean selected by packages in need of Java in order to build
 # (example: xbmc)
 config BR2_NEEDS_HOST_JAVA
diff --git a/Makefile b/Makefile
index 76c9bff..60d9a0f 100644
--- a/Makefile
+++ b/Makefile
@@ -712,6 +712,7 @@ COMMON_CONFIG_ENV = \
 	KCONFIG_TRISTATE=$(BUILD_DIR)/buildroot-config/tristate.config \
 	BR2_CONFIG=$(BR2_CONFIG) \
 	BR2_EXTERNAL=$(BR2_EXTERNAL) \
+	$(shell support/scripts/gcc-version-variables $(HOSTCC_NOCCACHE)) \
 	SKIP_LEGACY=
 
 xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
index 139123e..c2d9f75 100644
--- a/docs/manual/adding-packages-directory.txt
+++ b/docs/manual/adding-packages-directory.txt
@@ -283,6 +283,13 @@ use in the comment.
 ** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
    +X.Y+ with the proper version)
 
+* Host GCC version
+** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
+   +X_Y+ with the proper version, see +Config.in+)
+** Comment string: no comment to be added
+** Note that it is usually not the package itself that has a minimum
+   host GCC version, but rather a host-package on which it depends.
+
 * C library
 ** Dependency symbol: +BR2_TOOLCHAIN_USES_GLIBC+,
    +BR2_TOOLCHAIN_USES_MUSL+, +BR2_TOOLCHAIN_USES_UCLIBC+
diff --git a/support/scripts/gcc-version-variables b/support/scripts/gcc-version-variables
new file mode 100755
index 0000000..282cfc3
--- /dev/null
+++ b/support/scripts/gcc-version-variables
@@ -0,0 +1,56 @@
+#! /bin/sh
+#
+# Print the environment variables for top-level Config.in's
+# HOST_GCC_AT_LEAST_X_Y. First argument is the compiler.
+#
+# Copyright (C) 2014 by the Buildroot developers <buildroot@buildroot.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+HOSTCC_NOCCACHE="$1"
+
+# hostcc version as an integer - E.G. 4.9.2 => 49
+HOSTCC_VERSION=$(${HOSTCC_NOCCACHE} --version | \
+    sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$/\1\2/p')
+
+if [ -z "$HOSTCC_VERSION" ]; then
+    printf 'Usage: %s <path-to-compiler>\n' "$0" 1>&2
+    exit 1
+fi
+
+print_host_gcc_at_least() {
+    local version
+    printf 'HOST_GCC_AT_LEAST_%s' "$1"
+    if [ "$2" ]; then
+        printf '_%s' "$2"
+        version="$1$2"
+    else
+        version="${1}0"
+    fi
+    printf '='
+
+    if [ "$HOSTCC_VERSION" -ge $version ]; then
+        printf 'y'
+    else
+        printf 'n'
+    fi
+    printf ' '
+}
+
+print_host_gcc_at_least 4 7
+print_host_gcc_at_least 4 8
+print_host_gcc_at_least 4 9
+print_host_gcc_at_least 5
-- 
2.6.2

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

* [Buildroot] [PATCH 3/3] nodejs: version 4.X needs host GCC >= 4.8
  2015-11-21 23:18 [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
  2015-11-21 23:18 ` [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y Arnout Vandecappelle
@ 2015-11-21 23:18 ` Arnout Vandecappelle
  2015-11-22 19:52 ` [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
  2015-11-22 21:43 ` Peter Korsgaard
  3 siblings, 0 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-21 23:18 UTC (permalink / raw)
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/3fd1d18f0535bb8b969f808a5837c4a8111e69b9
http://autobuild.buildroot.org/results/72b80a434547931e1deb6f0ba793a6d68accc9a2

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 package/nodejs/Config.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/nodejs/Config.in b/package/nodejs/Config.in
index 5128901..992e7a8 100644
--- a/package/nodejs/Config.in
+++ b/package/nodejs/Config.in
@@ -51,10 +51,12 @@ config BR2_BR2_PACKAGE_NODEJS_0_12_X
 config BR2_BR2_PACKAGE_NODEJS_4_X
 	bool "v4.1.2"
 	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
 comment "v4.1.2 needs a toolchain w/ gcc >= 4.8"
 	depends on BR2_PACKAGE_NODEJS_V8_ARCH_SUPPORTS
+	depends on BR2_HOST_GCC_AT_LEAST_4_8
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
 
 endchoice
-- 
2.6.2

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-21 23:18 [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
  2015-11-21 23:18 ` [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y Arnout Vandecappelle
  2015-11-21 23:18 ` [Buildroot] [PATCH 3/3] nodejs: version 4.X needs host GCC >= 4.8 Arnout Vandecappelle
@ 2015-11-22 19:52 ` Arnout Vandecappelle
  2015-11-22 21:43 ` Peter Korsgaard
  3 siblings, 0 replies; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-22 19:52 UTC (permalink / raw)
  To: buildroot

On 22-11-15 00:18, Arnout Vandecappelle (Essensium/Mind) wrote:
> HOSTCC_VERSION is no longer used since gcc switched to the package
> infrastructure in e236fe481. It was in fact no longer needed since we
> dropped support for gcc 4.3.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

 I just now notice that this patch is not really for master but for next, while
the other two are for master...


 Regards,
 Arnout

> ---
> Note that we currently claim to support system gcc >= 2.95, but I don't
> think that matches reality...
> ---
>  package/Makefile.in | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/package/Makefile.in b/package/Makefile.in
> index 85008bb..82a66c2 100644
> --- a/package/Makefile.in
> +++ b/package/Makefile.in
> @@ -219,10 +219,6 @@ HOST_CFLAGS   += $(HOST_CPPFLAGS)
>  HOST_CXXFLAGS += $(HOST_CFLAGS)
>  HOST_LDFLAGS  += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib
>  
> -# hostcc version as an integer - E.G. 4.3.2 => 432
> -HOSTCC_VERSION := $(shell $(HOSTCC_NOCCACHE) --version | \
> -	sed -n 's/^.* \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)[ ]*.*$$/\1\2\3/p')
> -
>  # host-intltool should be executed with the system perl, so we save
>  # the path to the system perl, before a host-perl built by Buildroot
>  # might get installed into $(HOST_DIR)/usr/bin and therefore appears
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-21 23:18 [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
                   ` (2 preceding siblings ...)
  2015-11-22 19:52 ` [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
@ 2015-11-22 21:43 ` Peter Korsgaard
  2015-11-23 19:50   ` Arnout Vandecappelle
  3 siblings, 1 reply; 15+ messages in thread
From: Peter Korsgaard @ 2015-11-22 21:43 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:

 > HOSTCC_VERSION is no longer used since gcc switched to the package
 > infrastructure in e236fe481. It was in fact no longer needed since we
 > dropped support for gcc 4.3.

 > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 > ---
 > Note that we currently claim to support system gcc >= 2.95, but I don't
 > think that matches reality...

Ehh, no. I guess a 4.x version would make more sense. Any idea what 'x'
should be? 3? 5? 7?

Committed to next, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-22 21:43 ` Peter Korsgaard
@ 2015-11-23 19:50   ` Arnout Vandecappelle
  2015-11-29 17:52     ` Thomas Petazzoni
  0 siblings, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-23 19:50 UTC (permalink / raw)
  To: buildroot

On 22-11-15 22:43, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
>
>  > HOSTCC_VERSION is no longer used since gcc switched to the package
>  > infrastructure in e236fe481. It was in fact no longer needed since we
>  > dropped support for gcc 4.3.
>
>  > Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>  > ---
>  > Note that we currently claim to support system gcc >= 2.95, but I don't
>  > think that matches reality...
>
> Ehh, no. I guess a 4.x version would make more sense. Any idea what 'x'
> should be? 3? 5? 7?

We'd need to check all the host packages (plus the packages that build a host
tool as part of the target build, like uboot) to be sure of that. The
autobuilders tell us that 4.7 at least is OK.

Regards,
Arnout

>
> Committed to next, thanks.
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-21 23:18 ` [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y Arnout Vandecappelle
@ 2015-11-29 17:48   ` Yann E. MORIN
  2015-11-29 20:55     ` Arnout Vandecappelle
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-11-29 17:48 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2015-11-22 00:18 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> Some host packages need a recent gcc version. Add symbols to Config.in
> to specify the HOSTCC version. The values are passed through the
> environment, and this environment is generated in a new support script.

I really don't like this...

Maybe it is a good candidate for a generated kconfig snippet, instead of
this generated-environment oddity?

Anyway, see below, you could generate only one environment variable,
instead of all of them...

> Also update the documentation to mention the new symbols.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  Config.in                                 | 17 ++++++++++
>  Makefile                                  |  1 +
>  docs/manual/adding-packages-directory.txt |  7 ++++
>  support/scripts/gcc-version-variables     | 56 +++++++++++++++++++++++++++++++
>  4 files changed, 81 insertions(+)
>  create mode 100755 support/scripts/gcc-version-variables
> 
> diff --git a/Config.in b/Config.in
> index d795361..7bec90c 100644
> --- a/Config.in
> +++ b/Config.in
> @@ -18,6 +18,23 @@ config BR2_EXTERNAL
>  	string
>  	option env="BR2_EXTERNAL"
>  
> +# Hidden config symbols for packages to check system gcc version
> +config BR2_HOST_GCC_AT_LEAST_4_7
> +	bool
> +	option env="HOST_GCC_AT_LEAST_4_7"
> +
> +config BR2_HOST_GCC_AT_LEAST_4_8
> +	bool
> +	option env="HOST_GCC_AT_LEAST_4_8"
> +
> +config BR2_HOST_GCC_AT_LEAST_4_9
> +	bool
> +	option env="HOST_GCC_AT_LEAST_4_9"
> +
> +config BR2_HOST_GCC_AT_LEAST_5
> +	bool
> +	option env="HOST_GCC_AT_LEAST_5"

If you make each of those options actually select the N-1 option, then
all you need if to set one environment variable.

[--SNIP--]
> diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
> index 139123e..c2d9f75 100644
> --- a/docs/manual/adding-packages-directory.txt
> +++ b/docs/manual/adding-packages-directory.txt
> @@ -283,6 +283,13 @@ use in the comment.
>  ** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
>     +X.Y+ with the proper version)
>  
> +* Host GCC version
> +** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
> +   +X_Y+ with the proper version, see +Config.in+)
> +** Comment string: no comment to be added
> +** Note that it is usually not the package itself that has a minimum
> +   host GCC version, but rather a host-package on which it depends.

Well, in case the package builds an internal host tool, and properly
separates BUILD_CC from CC, then the restriction does apply to the
package itself and not a host-package.

Regards,
Yann E. MORIN.

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

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-23 19:50   ` Arnout Vandecappelle
@ 2015-11-29 17:52     ` Thomas Petazzoni
  2015-11-29 20:39       ` Peter Korsgaard
  2015-11-29 20:45       ` Arnout Vandecappelle
  0 siblings, 2 replies; 15+ messages in thread
From: Thomas Petazzoni @ 2015-11-29 17:52 UTC (permalink / raw)
  To: buildroot

Arnout,

On Mon, 23 Nov 2015 20:50:36 +0100, Arnout Vandecappelle wrote:

> > Ehh, no. I guess a 4.x version would make more sense. Any idea what 'x'
> > should be? 3? 5? 7?
> 
> We'd need to check all the host packages (plus the packages that build a host
> tool as part of the target build, like uboot) to be sure of that. The
> autobuilders tell us that 4.7 at least is OK.

My autobuilder instance uses gcc 4.4:

test at build:~$ gcc -v
[...]
gcc version 4.4.5 (Debian 4.4.5-8)

(Yes, I'm running old stuff. On purpose.)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-29 17:52     ` Thomas Petazzoni
@ 2015-11-29 20:39       ` Peter Korsgaard
  2015-11-29 20:45       ` Arnout Vandecappelle
  1 sibling, 0 replies; 15+ messages in thread
From: Peter Korsgaard @ 2015-11-29 20:39 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

Hi,

>> > Ehh, no. I guess a 4.x version would make more sense. Any idea what 'x'
 >> > should be? 3? 5? 7?
 >> 
 >> We'd need to check all the host packages (plus the packages that build a host
 >> tool as part of the target build, like uboot) to be sure of that. The
 >> autobuilders tell us that 4.7 at least is OK.

 > My autobuilder instance uses gcc 4.4:

 > test at build:~$ gcc -v
 > [...]
 > gcc version 4.4.5 (Debian 4.4.5-8)

 > (Yes, I'm running old stuff. On purpose.)

Ok, good. RHEL6 afaik also uses GCC 4.4. In lack of a better option I
suggest we start requiring >= 4.4.

-- 
Venlig hilsen,
Peter Korsgaard 

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-29 17:52     ` Thomas Petazzoni
  2015-11-29 20:39       ` Peter Korsgaard
@ 2015-11-29 20:45       ` Arnout Vandecappelle
  2015-11-29 21:12         ` Peter Korsgaard
  1 sibling, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-29 20:45 UTC (permalink / raw)
  To: buildroot

On 29-11-15 18:52, Thomas Petazzoni wrote:
> Arnout,
> 
> On Mon, 23 Nov 2015 20:50:36 +0100, Arnout Vandecappelle wrote:
> 
>>> Ehh, no. I guess a 4.x version would make more sense. Any idea what 'x'
>>> should be? 3? 5? 7?
>>
>> We'd need to check all the host packages (plus the packages that build a host
>> tool as part of the target build, like uboot) to be sure of that. The
>> autobuilders tell us that 4.7 at least is OK.
> 
> My autobuilder instance uses gcc 4.4:
> 
> test at build:~$ gcc -v
> [...]
> gcc version 4.4.5 (Debian 4.4.5-8)
> 
> (Yes, I'm running old stuff. On purpose.)


 So, should we set it to 4.4?

 Ideally we should have a test instance on RHEL5 as well, there are definitely
still company deployments based on that. RHEL5 has gcc 4.1.

 RHEL4 has gcc 3.4 but I don't think that that is very useful.

 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-29 17:48   ` Yann E. MORIN
@ 2015-11-29 20:55     ` Arnout Vandecappelle
  2015-11-29 21:14       ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-29 20:55 UTC (permalink / raw)
  To: buildroot

On 29-11-15 18:48, Yann E. MORIN wrote:
> Arnout, All,
> 
> On 2015-11-22 00:18 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
>> Some host packages need a recent gcc version. Add symbols to Config.in
>> to specify the HOSTCC version. The values are passed through the
>> environment, and this environment is generated in a new support script.
> 
> I really don't like this...

 I originally had it as a make fragment :-P

> 
> Maybe it is a good candidate for a generated kconfig snippet, instead of
> this generated-environment oddity?

 I never thought of that, it would be a possibility. If I would have time :-)
I'd have a go at it.

> 
> Anyway, see below, you could generate only one environment variable,
> instead of all of them...
> 
>> Also update the documentation to mention the new symbols.
>>
>> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>> ---
>>  Config.in                                 | 17 ++++++++++
>>  Makefile                                  |  1 +
>>  docs/manual/adding-packages-directory.txt |  7 ++++
>>  support/scripts/gcc-version-variables     | 56 +++++++++++++++++++++++++++++++
>>  4 files changed, 81 insertions(+)
>>  create mode 100755 support/scripts/gcc-version-variables
>>
>> diff --git a/Config.in b/Config.in
>> index d795361..7bec90c 100644
>> --- a/Config.in
>> +++ b/Config.in
>> @@ -18,6 +18,23 @@ config BR2_EXTERNAL
>>  	string
>>  	option env="BR2_EXTERNAL"
>>  
>> +# Hidden config symbols for packages to check system gcc version
>> +config BR2_HOST_GCC_AT_LEAST_4_7
>> +	bool
>> +	option env="HOST_GCC_AT_LEAST_4_7"
>> +
>> +config BR2_HOST_GCC_AT_LEAST_4_8
>> +	bool
>> +	option env="HOST_GCC_AT_LEAST_4_8"
>> +
>> +config BR2_HOST_GCC_AT_LEAST_4_9
>> +	bool
>> +	option env="HOST_GCC_AT_LEAST_4_9"
>> +
>> +config BR2_HOST_GCC_AT_LEAST_5
>> +	bool
>> +	option env="HOST_GCC_AT_LEAST_5"
> 
> If you make each of those options actually select the N-1 option, then
> all you need if to set one environment variable.

 Alas, that is not possible with the env option. You'd need two symbols, one for
getting it from the environment and a real one that can be selected.

> 
> [--SNIP--]
>> diff --git a/docs/manual/adding-packages-directory.txt b/docs/manual/adding-packages-directory.txt
>> index 139123e..c2d9f75 100644
>> --- a/docs/manual/adding-packages-directory.txt
>> +++ b/docs/manual/adding-packages-directory.txt
>> @@ -283,6 +283,13 @@ use in the comment.
>>  ** Comment string: +gcc >= X.Y+ and/or `gcc <= X.Y` (replace
>>     +X.Y+ with the proper version)
>>  
>> +* Host GCC version
>> +** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
>> +   +X_Y+ with the proper version, see +Config.in+)
>> +** Comment string: no comment to be added
>> +** Note that it is usually not the package itself that has a minimum
>> +   host GCC version, but rather a host-package on which it depends.
> 
> Well, in case the package builds an internal host tool, and properly
> separates BUILD_CC from CC, then the restriction does apply to the
> package itself and not a host-package.

 Yeah I know, however it's complicated to explain that well in the manual, and I
don't believe it will ever happen in practice. Things built with BUILD_CC are
usually pretty simple tools.


 Regards,
 Arnout

> 
> Regards,
> Yann E. MORIN.
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION
  2015-11-29 20:45       ` Arnout Vandecappelle
@ 2015-11-29 21:12         ` Peter Korsgaard
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Korsgaard @ 2015-11-29 21:12 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> gcc version 4.4.5 (Debian 4.4.5-8)
 >> 
 >> (Yes, I'm running old stuff. On purpose.)

 >  So, should we set it to 4.4?

I think so, yes. With the autobuilder running we're fairly confident
that it really works with such an old gcc.


 >  Ideally we should have a test instance on RHEL5 as well, there are definitely
 > still company deployments based on that. RHEL5 has gcc 4.1.

I agree that we should have an autobuilder instance running with our
minimum hostcc version we support, as these kind of things can very
easily break without us noticing.

With that said, I really question the sensibility of building modern
packages on a 10 year old host system (gcc 4.1.0 is from February 2006),
and I would guess quite some stuff is broken.

And if something important is (or becomes in the future) broken, do we
spend time on fixing it?  What if upstream doesn't care about ancient
systems?


 >  RHEL4 has gcc 3.4 but I don't think that that is very useful.

No, please not.

-- 
Venlig hilsen,
Peter Korsgaard 

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-29 20:55     ` Arnout Vandecappelle
@ 2015-11-29 21:14       ` Yann E. MORIN
  2015-11-29 21:41         ` Arnout Vandecappelle
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-11-29 21:14 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2015-11-29 21:55 +0100, Arnout Vandecappelle spake thusly:
> On 29-11-15 18:48, Yann E. MORIN wrote:
> > Arnout, All,
> > 
> > On 2015-11-22 00:18 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
> >> Some host packages need a recent gcc version. Add symbols to Config.in
> >> to specify the HOSTCC version. The values are passed through the
> >> environment, and this environment is generated in a new support script.
> > 
> > I really don't like this...
> 
>  I originally had it as a make fragment :-P
> 
> > 
> > Maybe it is a good candidate for a generated kconfig snippet, instead of
> > this generated-environment oddity?
> 
>  I never thought of that, it would be a possibility. If I would have time :-)
> I'd have a go at it.

I already have all that is needed to generate a kconfig fragment, in my
multi br2-external series.

It was meant only as a mean to add the generated Config.in that
aggregates all the br2-external entries, but otherwise adds all the
dependencies in the Makefile to ensure the fragment is created before we
run any kconfig program.

So, if you could review those patches, we can get them early (if not the
complete series) so all you'd have is to write the kconfig snippet
generator for the host gcc version checks.

[--SNIP--]
> >> +# Hidden config symbols for packages to check system gcc version
> >> +config BR2_HOST_GCC_AT_LEAST_4_7
> >> +	bool
> >> +	option env="HOST_GCC_AT_LEAST_4_7"
> >> +
> >> +config BR2_HOST_GCC_AT_LEAST_4_8
> >> +	bool
> >> +	option env="HOST_GCC_AT_LEAST_4_8"
> >> +
> >> +config BR2_HOST_GCC_AT_LEAST_4_9
> >> +	bool
> >> +	option env="HOST_GCC_AT_LEAST_4_9"
> >> +
> >> +config BR2_HOST_GCC_AT_LEAST_5
> >> +	bool
> >> +	option env="HOST_GCC_AT_LEAST_5"
> > 
> > If you make each of those options actually select the N-1 option, then
> > all you need if to set one environment variable.
> 
>  Alas, that is not possible with the env option. You'd need two symbols, one for
> getting it from the environment and a real one that can be selected.

That's not what I conclude from my experiments:

    $ cat env-select.in
    comment "What is enabled?"
    config FOO
        bool
        option env="KCFG_FOO"
    config BAR
        bool
        select FOO
        option env="KCFG_BAR"
    comment "FOO=y"
        depends on FOO
    comment "BAR=y"
        depends on BAR

    $ KCFG_BAR=y mconf env-select.in
    *** What is enabled? ***
    *** FOO=y ***
    *** BAR=y ***

So, it seems BAR does indeed select FOO, no? ;-)

[--SNIP--]
> >> +* Host GCC version
> >> +** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
> >> +   +X_Y+ with the proper version, see +Config.in+)
> >> +** Comment string: no comment to be added
> >> +** Note that it is usually not the package itself that has a minimum
> >> +   host GCC version, but rather a host-package on which it depends.
> > 
> > Well, in case the package builds an internal host tool, and properly
> > separates BUILD_CC from CC, then the restriction does apply to the
> > package itself and not a host-package.
> 
>  Yeah I know, however it's complicated to explain that well in the manual, and I
> don't believe it will ever happen in practice. Things built with BUILD_CC are
> usually pretty simple tools.

Agreed.

Regards,
Yann E. MORIN.

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

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-29 21:14       ` Yann E. MORIN
@ 2015-11-29 21:41         ` Arnout Vandecappelle
  2015-11-29 21:53           ` Yann E. MORIN
  0 siblings, 1 reply; 15+ messages in thread
From: Arnout Vandecappelle @ 2015-11-29 21:41 UTC (permalink / raw)
  To: buildroot

On 29-11-15 22:14, Yann E. MORIN wrote:
> Arnout, All,
> 
> On 2015-11-29 21:55 +0100, Arnout Vandecappelle spake thusly:
>> On 29-11-15 18:48, Yann E. MORIN wrote:
>>> Arnout, All,
>>>
>>> On 2015-11-22 00:18 +0100, Arnout Vandecappelle (Essensium/Mind) spake thusly:
>>>> Some host packages need a recent gcc version. Add symbols to Config.in
>>>> to specify the HOSTCC version. The values are passed through the
>>>> environment, and this environment is generated in a new support script.
>>>
>>> I really don't like this...
>>
>>  I originally had it as a make fragment :-P
>>
>>>
>>> Maybe it is a good candidate for a generated kconfig snippet, instead of
>>> this generated-environment oddity?
>>
>>  I never thought of that, it would be a possibility. If I would have time :-)
>> I'd have a go at it.
> 
> I already have all that is needed to generate a kconfig fragment, in my
> multi br2-external series.

> 
> It was meant only as a mean to add the generated Config.in that
> aggregates all the br2-external entries, but otherwise adds all the
> dependencies in the Makefile to ensure the fragment is created before we
> run any kconfig program.
> 
> So, if you could review those patches, we can get them early (if not the
> complete series) so all you'd have is to write the kconfig snippet
> generator for the host gcc version checks.

 I'll try to do that.

> 
> [--SNIP--]
>>>> +# Hidden config symbols for packages to check system gcc version
>>>> +config BR2_HOST_GCC_AT_LEAST_4_7
>>>> +	bool
>>>> +	option env="HOST_GCC_AT_LEAST_4_7"
>>>> +
>>>> +config BR2_HOST_GCC_AT_LEAST_4_8
>>>> +	bool
>>>> +	option env="HOST_GCC_AT_LEAST_4_8"
>>>> +
>>>> +config BR2_HOST_GCC_AT_LEAST_4_9
>>>> +	bool
>>>> +	option env="HOST_GCC_AT_LEAST_4_9"
>>>> +
>>>> +config BR2_HOST_GCC_AT_LEAST_5
>>>> +	bool
>>>> +	option env="HOST_GCC_AT_LEAST_5"
>>>
>>> If you make each of those options actually select the N-1 option, then
>>> all you need if to set one environment variable.
>>
>>  Alas, that is not possible with the env option. You'd need two symbols, one for
>> getting it from the environment and a real one that can be selected.
> 
> That's not what I conclude from my experiments:
> 
>     $ cat env-select.in
>     comment "What is enabled?"
>     config FOO
>         bool
>         option env="KCFG_FOO"
>     config BAR
>         bool
>         select FOO
>         option env="KCFG_BAR"
>     comment "FOO=y"
>         depends on FOO
>     comment "BAR=y"
>         depends on BAR
> 
>     $ KCFG_BAR=y mconf env-select.in
>     *** What is enabled? ***
>     *** FOO=y ***
>     *** BAR=y ***
> 
> So, it seems BAR does indeed select FOO, no? ;-)

 OK, I just remembered something like that from experiments with LEGACY and
didn't try again. I guess I remembered incorrectly :-)


 Regards,
 Arnout

> 
> [--SNIP--]
>>>> +* Host GCC version
>>>> +** Dependency symbol: +BR2_HOST_GCC_AT_LEAST_X_Y+, (replace
>>>> +   +X_Y+ with the proper version, see +Config.in+)
>>>> +** Comment string: no comment to be added
>>>> +** Note that it is usually not the package itself that has a minimum
>>>> +   host GCC version, but rather a host-package on which it depends.
>>>
>>> Well, in case the package builds an internal host tool, and properly
>>> separates BUILD_CC from CC, then the restriction does apply to the
>>> package itself and not a host-package.
>>
>>  Yeah I know, however it's complicated to explain that well in the manual, and I
>> don't believe it will ever happen in practice. Things built with BUILD_CC are
>> usually pretty simple tools.
> 
> Agreed.
> 
> Regards,
> Yann E. MORIN.
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y
  2015-11-29 21:41         ` Arnout Vandecappelle
@ 2015-11-29 21:53           ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-11-29 21:53 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2015-11-29 22:41 +0100, Arnout Vandecappelle spake thusly:
> On 29-11-15 22:14, Yann E. MORIN wrote:
> > On 2015-11-29 21:55 +0100, Arnout Vandecappelle spake thusly:
> >> On 29-11-15 18:48, Yann E. MORIN wrote:
[--SNIP--]
> >>> If you make each of those options actually select the N-1 option, then
> >>> all you need if to set one environment variable.
> >>  Alas, that is not possible with the env option. You'd need two symbols, one for
> >> getting it from the environment and a real one that can be selected.
> > That's not what I conclude from my experiments:
[--SNIP--]
>  OK, I just remembered something like that from experiments with LEGACY and
> didn't try again. I guess I remembered incorrectly :-)

What is sure is that those symbols are not saved in .config .

Not sure how legacy would have been impacted by the env option,
though...

Regards,
Yann E. MORIN.

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

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

end of thread, other threads:[~2015-11-29 21:53 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-21 23:18 [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
2015-11-21 23:18 ` [Buildroot] [PATCH 2/3] Config.in: add symbols for BR2_HOST_GCC_AT_LEAST_X_Y Arnout Vandecappelle
2015-11-29 17:48   ` Yann E. MORIN
2015-11-29 20:55     ` Arnout Vandecappelle
2015-11-29 21:14       ` Yann E. MORIN
2015-11-29 21:41         ` Arnout Vandecappelle
2015-11-29 21:53           ` Yann E. MORIN
2015-11-21 23:18 ` [Buildroot] [PATCH 3/3] nodejs: version 4.X needs host GCC >= 4.8 Arnout Vandecappelle
2015-11-22 19:52 ` [Buildroot] [PATCH 1/3] package/Makefile.in: remove HOSTCC_VERSION Arnout Vandecappelle
2015-11-22 21:43 ` Peter Korsgaard
2015-11-23 19:50   ` Arnout Vandecappelle
2015-11-29 17:52     ` Thomas Petazzoni
2015-11-29 20:39       ` Peter Korsgaard
2015-11-29 20:45       ` Arnout Vandecappelle
2015-11-29 21:12         ` Peter Korsgaard

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.