diff mbox

[RESEND] OvmfPkg/build.sh: Use GCC49 toolchain with GCC 6.*

Message ID 20161121155651.4781-2-konrad@kernel.org (mailing list archive)
State New, archived
Headers show

Commit Message

Konrad Rzeszutek Wilk Nov. 21, 2016, 3:56 p.m. UTC
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(-)

Comments

Ard Biesheuvel Nov. 21, 2016, 4:20 p.m. UTC | #1
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
Laszlo Ersek Nov. 21, 2016, 8:07 p.m. UTC | #2
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
Konrad Rzeszutek Wilk Nov. 23, 2016, 2:36 a.m. UTC | #3
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(-)
diff mbox

Patch

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
         ;;
       *)