public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH RESEND] Fix TianoCore building under Fedora Core 25
@ 2016-11-21 15:56 Konrad Rzeszutek Wilk
  2016-11-21 15:56 ` [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.* Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-21 15:56 UTC (permalink / raw)
  To: edk2-devel; +Cc: xen-devel

(Resending as I was not subscribed to edk2-devel@lists.01.org when
I sent out the patch, now I am)

Please accept and review the following patch which enables me to
build TianoCore under Fedora Core 25.

The GCC version that is installed is:

gcc (GCC) 6.2.1 20160916 (Red Hat 6.2.1-2)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

And currently there are no runes for it - which means it falls back
to GCC44 and fails to build.

The patch fixes that.

Thanks!


Konrad Rzeszutek Wilk (1):
      OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.*


 OvmfPkg/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



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

* [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.*
  2016-11-21 15:56 [PATCH RESEND] Fix TianoCore building under Fedora Core 25 Konrad Rzeszutek Wilk
@ 2016-11-21 15:56 ` Konrad Rzeszutek Wilk
  2016-11-21 16:20   ` Ard Biesheuvel
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-21 15:56 UTC (permalink / raw)
  To: edk2-devel; +Cc: xen-devel, Konrad Rzeszutek Wilk

Without this I cannot build it under Fedora Core 25.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
---
 OvmfPkg/build.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index eb5eb73..759ade3 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -95,7 +95,7 @@ case `uname` in
       4.8.*)
         TARGET_TOOLS=GCC48
         ;;
-      4.9.*|4.1[0-9].*|5.*.*)
+      4.9.*|4.1[0-9].*|5.*.*|6.*.*)
         TARGET_TOOLS=GCC49
         ;;
       *)
-- 
2.9.3



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

* Re: [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.*
  2016-11-21 15:56 ` [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.* Konrad Rzeszutek Wilk
@ 2016-11-21 16:20   ` Ard Biesheuvel
  2016-11-21 20:07     ` Laszlo Ersek
  0 siblings, 1 reply; 13+ messages in thread
From: Ard Biesheuvel @ 2016-11-21 16:20 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: edk2-devel-01, xen-devel

On 21 November 2016 at 15:56, Konrad Rzeszutek Wilk <konrad@kernel.org> wrote:
> Without this I cannot build it under Fedora Core 25.
>
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> ---
>  OvmfPkg/build.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index eb5eb73..759ade3 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -95,7 +95,7 @@ case `uname` in
>        4.8.*)
>          TARGET_TOOLS=GCC48
>          ;;
> -      4.9.*|4.1[0-9].*|5.*.*)
> +      4.9.*|4.1[0-9].*|5.*.*|6.*.*)
>          TARGET_TOOLS=GCC49
>          ;;
>        *)

I think it may be time to start using GCC5 for 5.x and later


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

* Re: [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.*
  2016-11-21 16:20   ` Ard Biesheuvel
@ 2016-11-21 20:07     ` Laszlo Ersek
  2016-11-23  2:36       ` [PATCH v2] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Laszlo Ersek @ 2016-11-21 20:07 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk
  Cc: Ard Biesheuvel, xen-devel, edk2-devel-01,
	Jordan Justen (Intel address), Olaf Hering

On 11/21/16 17:20, Ard Biesheuvel wrote:
> On 21 November 2016 at 15:56, Konrad Rzeszutek Wilk <konrad@kernel.org> wrote:
>> Without this I cannot build it under Fedora Core 25.
>>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
>> ---
>>  OvmfPkg/build.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>> index eb5eb73..759ade3 100755
>> --- a/OvmfPkg/build.sh
>> +++ b/OvmfPkg/build.sh
>> @@ -95,7 +95,7 @@ case `uname` in
>>        4.8.*)
>>          TARGET_TOOLS=GCC48
>>          ;;
>> -      4.9.*|4.1[0-9].*|5.*.*)
>> +      4.9.*|4.1[0-9].*|5.*.*|6.*.*)
>>          TARGET_TOOLS=GCC49
>>          ;;
>>        *)
> 
> I think it may be time to start using GCC5 for 5.x and later

I agree.

We have an open BZ for this:

https://bugzilla.tianocore.org/show_bug.cgi?id=62

Olaf Hering submitted a patch around June, but the formalities on those
patches weren't right, and Olaf decided not to submit further versions
of the patch.

Here's the idea:
- change the catch-all (*) to GCC5, from GCC44
- remove the (5.*.*) pattern from GCC49
- add a branch (with multiple patterns if necessary) for gcc-4.3 and
  earlier to exit with an error message / failure (those compiler
  versions are unsupported)

Konrad, can you please submit a v2 with this? If so, please add the tag

Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62

as well, just before the "Contributed-under:" tag.

(Side note: we haven't been ignoring BZ#62. It's just that after
reviewing Olaf's original patch, implementing the change -- which is
very simple and cannot really be done in different ways -- in his stead
would have practically consisted of replacing Olaf's signoff with
someone elses, and we couldn't do that.)

Thank you,
Laszlo


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

* [PATCH v2] Compile TianoCore under Fedora Core 25
  2016-11-21 20:07     ` Laszlo Ersek
@ 2016-11-23  2:36       ` Konrad Rzeszutek Wilk
  2016-11-23  2:36         ` [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-23  2:36 UTC (permalink / raw)
  To: lersek, edk2-devel; +Cc: xen-devel

Hey!

This patch allows me to compile TianoCore under Fedora Core 25.

I've also tested it under some older ancient distros, such as:

Ubuntu 16.04.1 (GCC 5.4.0), uses GCC5
Debian 8.6 (GCC 4.9.2), uses GCC49
Fedora Core 13 (GCC 4.4.4), uses GCC44
RHEL6 (GCC 4.4.7), uses GCC44
RHEL5 (GCC 4.1.2), it does not even get to the message:

$  OvmfPkg/build.sh -a X64 -b RELEASE -n 4
Initializing workspace
/home/konrad/ovmf-dir-remote/BaseTools
Loading previous configuration from /home/konrad/ovmf-dir-remote/Conf/BuildEnv.sh
WORKSPACE: /home/konrad/ovmf-dir-remote
EDK_TOOLS_PATH: /home/konrad/ovmf-dir-remote/BaseTools
CONF_PATH: /home/konrad/ovmf-dir-remote/Conf
using prebuilt tools
Running edk2 build for OvmfPkgX64
  File "/home/konrad/ovmf-dir-remote/BaseTools/BinWrappers/PosixLike/../../Source/Python/build/build.py", line 703
    class PeImageInfo():
                      ^
SyntaxError: invalid syntax

Please review the patch at your convience.

Konrad Rzeszutek Wilk (1):
      OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier

 OvmfPkg/build.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)


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

* [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-23  2:36       ` [PATCH v2] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
@ 2016-11-23  2:36         ` Konrad Rzeszutek Wilk
  2016-11-23  3:37           ` Jordan Justen
  2016-11-23 14:55           ` Laszlo Ersek
  0 siblings, 2 replies; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-23  2:36 UTC (permalink / raw)
  To: lersek, edk2-devel; +Cc: xen-devel, Konrad Rzeszutek Wilk

>From Laszlo:
" change the catch-all (*) to GCC5, from GCC44
- remove the (5.*.*) pattern from GCC49
- add a branch (with multiple patterns if necessary) for gcc-4.3 and
  earlier to exit with an error message / failure (those compiler
  versions are unsupported)"

Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
---
v1: First submission
v2: Redo it per Laszlo suggestion.

 OvmfPkg/build.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index eb5eb73..cab7c70 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -83,6 +83,13 @@ case `uname` in
   Linux*)
     gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
     case $gcc_version in
+      4.1.[0-0].*|4.2.*|4.3.*)
+        echo OvmfPkg requires GCC4.4 or later
+        exit 1
+        ;;
+      4.4.*)
+        TARGET_TOOLS=GCC44
+        ;;
       4.5.*)
         TARGET_TOOLS=GCC45
         ;;
@@ -95,11 +102,11 @@ case `uname` in
       4.8.*)
         TARGET_TOOLS=GCC48
         ;;
-      4.9.*|4.1[0-9].*|5.*.*)
+      4.9.*)
         TARGET_TOOLS=GCC49
         ;;
       *)
-        TARGET_TOOLS=GCC44
+        TARGET_TOOLS=GCC5
         ;;
     esac
 esac
-- 
2.9.3



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

* Re: [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-23  2:36         ` [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
@ 2016-11-23  3:37           ` Jordan Justen
  2016-11-23 14:55           ` Laszlo Ersek
  1 sibling, 0 replies; 13+ messages in thread
From: Jordan Justen @ 2016-11-23  3:37 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, lersek, edk2-devel; +Cc: xen-devel

On 2016-11-22 18:36:43, Konrad Rzeszutek Wilk wrote:
> From Laszlo:
> " change the catch-all (*) to GCC5, from GCC44
> - remove the (5.*.*) pattern from GCC49
> - add a branch (with multiple patterns if necessary) for gcc-4.3 and
>   earlier to exit with an error message / failure (those compiler
>   versions are unsupported)"

For future reference, I'd suggest this for the formatting of your
commit message body.

v2:
 * Changes suggested by Laszlo:
   - change the catch-all (*) to GCC5, from GCC44
   - remove the (5.*.*) pattern from GCC49
   - generate error for GCC < 4.4

Patch is Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

I'll let Laszlo take a look too.

Thanks for the contribution!

-Jordan

> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> ---
> v1: First submission
> v2: Redo it per Laszlo suggestion.
> 
>  OvmfPkg/build.sh | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index eb5eb73..cab7c70 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -83,6 +83,13 @@ case `uname` in
>    Linux*)
>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>      case $gcc_version in
> +      4.1.[0-0].*|4.2.*|4.3.*)
> +        echo OvmfPkg requires GCC4.4 or later
> +        exit 1
> +        ;;
> +      4.4.*)
> +        TARGET_TOOLS=GCC44
> +        ;;
>        4.5.*)
>          TARGET_TOOLS=GCC45
>          ;;
> @@ -95,11 +102,11 @@ case `uname` in
>        4.8.*)
>          TARGET_TOOLS=GCC48
>          ;;
> -      4.9.*|4.1[0-9].*|5.*.*)
> +      4.9.*)
>          TARGET_TOOLS=GCC49
>          ;;
>        *)
> -        TARGET_TOOLS=GCC44
> +        TARGET_TOOLS=GCC5
>          ;;
>      esac
>  esac
> -- 
> 2.9.3
> 
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel


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

* Re: [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-23  2:36         ` [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
  2016-11-23  3:37           ` Jordan Justen
@ 2016-11-23 14:55           ` Laszlo Ersek
  2016-11-23 14:59             ` Laszlo Ersek
       [not found]             ` <20161123150126.GA21907@char.us.oracle.com>
  1 sibling, 2 replies; 13+ messages in thread
From: Laszlo Ersek @ 2016-11-23 14:55 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, edk2-devel; +Cc: xen-devel

On 11/23/16 03:36, Konrad Rzeszutek Wilk wrote:
> From Laszlo:
> " change the catch-all (*) to GCC5, from GCC44
> - remove the (5.*.*) pattern from GCC49
> - add a branch (with multiple patterns if necessary) for gcc-4.3 and
>   earlier to exit with an error message / failure (those compiler
>   versions are unsupported)"
> 
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> ---
> v1: First submission
> v2: Redo it per Laszlo suggestion.
> 
>  OvmfPkg/build.sh | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index eb5eb73..cab7c70 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -83,6 +83,13 @@ case `uname` in
>    Linux*)
>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>      case $gcc_version in
> +      4.1.[0-0].*|4.2.*|4.3.*)

* The [0-0] bracketed expression will work as expected, but it's
somewhat unusual :) Is it intentional?

* If it's a typo, are you okay if I replace it with a plain 0 on commit?

* Also, IIRC, Olaf considered pre-4.0 gcc releases as well (rejecting
them of course), which is sort of meant as part of "gcc-4.3 and
earlier". But, given your extensive testing with old distros (thanks for
that!), I think it's safe to ignore pre-4.0 gcc releases altogether.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

Thanks!
Laszlo

> +        echo OvmfPkg requires GCC4.4 or later
> +        exit 1
> +        ;;
> +      4.4.*)
> +        TARGET_TOOLS=GCC44
> +        ;;
>        4.5.*)
>          TARGET_TOOLS=GCC45
>          ;;
> @@ -95,11 +102,11 @@ case `uname` in
>        4.8.*)
>          TARGET_TOOLS=GCC48
>          ;;
> -      4.9.*|4.1[0-9].*|5.*.*)
> +      4.9.*)
>          TARGET_TOOLS=GCC49
>          ;;
>        *)
> -        TARGET_TOOLS=GCC44
> +        TARGET_TOOLS=GCC5
>          ;;
>      esac
>  esac
> 



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

* Re: [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-23 14:55           ` Laszlo Ersek
@ 2016-11-23 14:59             ` Laszlo Ersek
       [not found]             ` <20161123150126.GA21907@char.us.oracle.com>
  1 sibling, 0 replies; 13+ messages in thread
From: Laszlo Ersek @ 2016-11-23 14:59 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, edk2-devel; +Cc: xen-devel

On 11/23/16 15:55, Laszlo Ersek wrote:
> On 11/23/16 03:36, Konrad Rzeszutek Wilk wrote:
>> From Laszlo:
>> " change the catch-all (*) to GCC5, from GCC44
>> - remove the (5.*.*) pattern from GCC49
>> - add a branch (with multiple patterns if necessary) for gcc-4.3 and
>>   earlier to exit with an error message / failure (those compiler
>>   versions are unsupported)"
>>
>> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
>> ---
>> v1: First submission
>> v2: Redo it per Laszlo suggestion.
>>
>>  OvmfPkg/build.sh | 11 +++++++++--
>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>> index eb5eb73..cab7c70 100755
>> --- a/OvmfPkg/build.sh
>> +++ b/OvmfPkg/build.sh
>> @@ -83,6 +83,13 @@ case `uname` in
>>    Linux*)
>>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>>      case $gcc_version in
>> +      4.1.[0-0].*|4.2.*|4.3.*)
> 
> * The [0-0] bracketed expression will work as expected, but it's
> somewhat unusual :) Is it intentional?
> 
> * If it's a typo, are you okay if I replace it with a plain 0 on commit?

On a second thought, perhaps you meant

  4.0.*|4.1.*|4.2.*|4.3.*)

or

  4.[0-3].*)

If you wish to re-submit for this, we could consider those pre-4
releases as well:

  [1-3].*|4.[0-3].*)

Thanks!
Laszlo

> * Also, IIRC, Olaf considered pre-4.0 gcc releases as well (rejecting
> them of course), which is sort of meant as part of "gcc-4.3 and
> earlier". But, given your extensive testing with old distros (thanks for
> that!), I think it's safe to ignore pre-4.0 gcc releases altogether.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> 
> Thanks!
> Laszlo
> 
>> +        echo OvmfPkg requires GCC4.4 or later
>> +        exit 1
>> +        ;;
>> +      4.4.*)
>> +        TARGET_TOOLS=GCC44
>> +        ;;
>>        4.5.*)
>>          TARGET_TOOLS=GCC45
>>          ;;
>> @@ -95,11 +102,11 @@ case `uname` in
>>        4.8.*)
>>          TARGET_TOOLS=GCC48
>>          ;;
>> -      4.9.*|4.1[0-9].*|5.*.*)
>> +      4.9.*)
>>          TARGET_TOOLS=GCC49
>>          ;;
>>        *)
>> -        TARGET_TOOLS=GCC44
>> +        TARGET_TOOLS=GCC5
>>          ;;
>>      esac
>>  esac
>>
> 



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

* Re: [Xen-devel] [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
       [not found]             ` <20161123150126.GA21907@char.us.oracle.com>
@ 2016-11-23 21:08               ` Laszlo Ersek
  2016-11-24  1:15                 ` PATCH v3] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Laszlo Ersek @ 2016-11-23 21:08 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk; +Cc: Konrad Rzeszutek Wilk, edk2-devel, xen-devel

On 11/23/16 16:01, Konrad Rzeszutek Wilk wrote:
> On Wed, Nov 23, 2016 at 03:55:11PM +0100, Laszlo Ersek wrote:
>> On 11/23/16 03:36, Konrad Rzeszutek Wilk wrote:
>>> From Laszlo:
>>> " change the catch-all (*) to GCC5, from GCC44
>>> - remove the (5.*.*) pattern from GCC49
>>> - add a branch (with multiple patterns if necessary) for gcc-4.3 and
>>>   earlier to exit with an error message / failure (those compiler
>>>   versions are unsupported)"
>>>
>>> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
>>> Contributed-under: TianoCore Contribution Agreement 1.0
>>> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
>>> ---
>>> v1: First submission
>>> v2: Redo it per Laszlo suggestion.
>>>
>>>  OvmfPkg/build.sh | 11 +++++++++--
>>>  1 file changed, 9 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
>>> index eb5eb73..cab7c70 100755
>>> --- a/OvmfPkg/build.sh
>>> +++ b/OvmfPkg/build.sh
>>> @@ -83,6 +83,13 @@ case `uname` in
>>>    Linux*)
>>>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>>>      case $gcc_version in
>>> +      4.1.[0-0].*|4.2.*|4.3.*)
>>
>> * The [0-0] bracketed expression will work as expected, but it's
>> somewhat unusual :) Is it intentional?
>>
>> * If it's a typo, are you okay if I replace it with a plain 0 on commit?
> 
> It is a typo! It was 0-9 but I forgot to type 'git commit --amend'. Argh!
> 
> Are you OK doing:
> 
>  s/[0-0]/[0-9]/
> 
> when you commit or would you prefer I repost this with this in _and_ with
> your Reviewed-by?

I highly appreciate that you are willing to repost :) So yes, I'd like
to request you do that.

However, since you are willing to repost :), I also ask that you to
reformat the commit message as suggested by Jordan:

  https://lists.01.org/pipermail/edk2-devel/2016-November/005087.html

and to update the line that you are about to modify anyway, to:

  [1-3].*|4.[0-3].*)

  https://lists.01.org/pipermail/edk2-devel/2016-November/005129.html

If you agree, of course. (I'm not trying to be an annoyance on purpose.)

Thank you for working on this!
Laszlo

> 
>>
>> * Also, IIRC, Olaf considered pre-4.0 gcc releases as well (rejecting
>> them of course), which is sort of meant as part of "gcc-4.3 and
>> earlier". But, given your extensive testing with old distros (thanks for
> 
> Oh gosh.
>> that!), I think it's safe to ignore pre-4.0 gcc releases altogether.
> 
> Yes :-)
>>
>> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
>>
>> Thanks!
>> Laszlo
>>
>>> +        echo OvmfPkg requires GCC4.4 or later
>>> +        exit 1
>>> +        ;;
>>> +      4.4.*)
>>> +        TARGET_TOOLS=GCC44
>>> +        ;;
>>>        4.5.*)
>>>          TARGET_TOOLS=GCC45
>>>          ;;
>>> @@ -95,11 +102,11 @@ case `uname` in
>>>        4.8.*)
>>>          TARGET_TOOLS=GCC48
>>>          ;;
>>> -      4.9.*|4.1[0-9].*|5.*.*)
>>> +      4.9.*)
>>>          TARGET_TOOLS=GCC49
>>>          ;;
>>>        *)
>>> -        TARGET_TOOLS=GCC44
>>> +        TARGET_TOOLS=GCC5
>>>          ;;
>>>      esac
>>>  esac
>>>
>>
>>
>> _______________________________________________
>> Xen-devel mailing list
>> Xen-devel@lists.xen.org
>> https://lists.xen.org/xen-devel



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

* PATCH v3] Compile TianoCore under Fedora Core 25
  2016-11-23 21:08               ` [Xen-devel] " Laszlo Ersek
@ 2016-11-24  1:15                 ` Konrad Rzeszutek Wilk
  2016-11-24  1:15                   ` [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-24  1:15 UTC (permalink / raw)
  To: lersek, edk2-devel; +Cc: xen-devel

Hey!

Changelog:
v3: It is perfect!
  - Redid commit per Jordan suggestion
  - Redid the failure scenario per Laszlo suggestion
  - Redid the testing

v2:
 - Redid it per Laszlo suggestion, added the URL to the bugzilla system
 - Tested it under more OSes

This patch allows me to compile TianoCore under Fedora Core 25.

I've also tested it (v2 and also this v3) under some more ancient distros, such as:

Ubuntu 16.04.1 (GCC 5.4.0), uses GCC5
Debian 8.6 (GCC 4.9.2), uses GCC49
Fedora Core 13 (GCC 4.4.4), uses GCC44
RHEL6 (GCC 4.4.7), uses GCC44

And on earlier versions, such as RHEL5:

[konrad@ol5 ovmf-dir]$ OvmfPkg/build.sh -a X64 -b RELEASE -n 4
Initializing workspace
/home/konrad/ovmf-dir/BaseTools
Loading previous configuration from /home/konrad/ovmf-dir/Conf/BuildEnv.sh
WORKSPACE: /home/konrad/ovmf-dir
EDK_TOOLS_PATH: /home/konrad/ovmf-dir/BaseTools
CONF_PATH: /home/konrad/ovmf-dir/Conf
OvmfPkg requires GCC4.4 or later

[konrad@ol5 ovmf-dir]$ gcc --version
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-54)

[Oddly enough the previous run (v2) - on an different RHEL5 guest - had
a different issue.]


Konrad Rzeszutek Wilk (1):
      OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier

 OvmfPkg/build.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)



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

* [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-24  1:15                 ` PATCH v3] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
@ 2016-11-24  1:15                   ` Konrad Rzeszutek Wilk
  2016-11-24  8:51                     ` Laszlo Ersek
  0 siblings, 1 reply; 13+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-11-24  1:15 UTC (permalink / raw)
  To: lersek, edk2-devel; +Cc: xen-devel, Konrad Rzeszutek Wilk

v2:
 * Changes suggested by Laszlo:
   - change the catch-all (*) to GCC5, from GCC44
   - remove the (5.*.*) pattern from GCC49
   - generate error for GCC < 4.4

In v3, also generate error for really GCC < 4.4, like GCC 1.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
---
v1: Initial
v2: Redo it per Laszlo suggestions
v3: Fix up commit message per Jordan
    Also generate error for prehistoric versions of GCC, like 1.
---
 OvmfPkg/build.sh | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
index eb5eb73..95fe8fb 100755
--- a/OvmfPkg/build.sh
+++ b/OvmfPkg/build.sh
@@ -83,6 +83,13 @@ case `uname` in
   Linux*)
     gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
     case $gcc_version in
+      [1-3].*|4.[0-3].*)
+        echo OvmfPkg requires GCC4.4 or later
+        exit 1
+        ;;
+      4.4.*)
+        TARGET_TOOLS=GCC44
+        ;;
       4.5.*)
         TARGET_TOOLS=GCC45
         ;;
@@ -95,11 +102,11 @@ case `uname` in
       4.8.*)
         TARGET_TOOLS=GCC48
         ;;
-      4.9.*|4.1[0-9].*|5.*.*)
+      4.9.*)
         TARGET_TOOLS=GCC49
         ;;
       *)
-        TARGET_TOOLS=GCC44
+        TARGET_TOOLS=GCC5
         ;;
     esac
 esac
-- 
2.9.3



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

* Re: [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier
  2016-11-24  1:15                   ` [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
@ 2016-11-24  8:51                     ` Laszlo Ersek
  0 siblings, 0 replies; 13+ messages in thread
From: Laszlo Ersek @ 2016-11-24  8:51 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, edk2-devel; +Cc: xen-devel

On 11/24/16 02:15, Konrad Rzeszutek Wilk wrote:
> v2:
>  * Changes suggested by Laszlo:
>    - change the catch-all (*) to GCC5, from GCC44
>    - remove the (5.*.*) pattern from GCC49
>    - generate error for GCC < 4.4
> 
> In v3, also generate error for really GCC < 4.4, like GCC 1.
> 
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
> Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=62
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Konrad Rzeszutek Wilk <konrad@kernel.org>
> ---
> v1: Initial
> v2: Redo it per Laszlo suggestions
> v3: Fix up commit message per Jordan
>     Also generate error for prehistoric versions of GCC, like 1.
> ---
>  OvmfPkg/build.sh | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index eb5eb73..95fe8fb 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -83,6 +83,13 @@ case `uname` in
>    Linux*)
>      gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}')
>      case $gcc_version in
> +      [1-3].*|4.[0-3].*)
> +        echo OvmfPkg requires GCC4.4 or later
> +        exit 1
> +        ;;
> +      4.4.*)
> +        TARGET_TOOLS=GCC44
> +        ;;
>        4.5.*)
>          TARGET_TOOLS=GCC45
>          ;;
> @@ -95,11 +102,11 @@ case `uname` in
>        4.8.*)
>          TARGET_TOOLS=GCC48
>          ;;
> -      4.9.*|4.1[0-9].*|5.*.*)
> +      4.9.*)
>          TARGET_TOOLS=GCC49
>          ;;
>        *)
> -        TARGET_TOOLS=GCC44
> +        TARGET_TOOLS=GCC5
>          ;;
>      esac
>  esac
> 

Tested-by: Laszlo Ersek <lersek@redhat.com>

(With gcc-4.8.)

Pushed as commit 2667ad40919a.

Thank you!
Laszlo


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

end of thread, other threads:[~2016-11-24  8:51 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-21 15:56 [PATCH RESEND] Fix TianoCore building under Fedora Core 25 Konrad Rzeszutek Wilk
2016-11-21 15:56 ` [PATCH RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.* Konrad Rzeszutek Wilk
2016-11-21 16:20   ` Ard Biesheuvel
2016-11-21 20:07     ` Laszlo Ersek
2016-11-23  2:36       ` [PATCH v2] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
2016-11-23  2:36         ` [PATCH v2] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
2016-11-23  3:37           ` Jordan Justen
2016-11-23 14:55           ` Laszlo Ersek
2016-11-23 14:59             ` Laszlo Ersek
     [not found]             ` <20161123150126.GA21907@char.us.oracle.com>
2016-11-23 21:08               ` [Xen-devel] " Laszlo Ersek
2016-11-24  1:15                 ` PATCH v3] Compile TianoCore under Fedora Core 25 Konrad Rzeszutek Wilk
2016-11-24  1:15                   ` [PATCH v3] OvmfPkg/build.sh: Make GCC5 the default toolchain, catch GCC43 and earlier Konrad Rzeszutek Wilk
2016-11-24  8:51                     ` Laszlo Ersek

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