From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.221.67, mailfrom: philmd@redhat.com) Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by groups.io with SMTP; Wed, 10 Apr 2019 07:41:47 -0700 Received: by mail-wr1-f67.google.com with SMTP id s15so3230883wra.12 for ; Wed, 10 Apr 2019 07:41:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:cc:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UJzoCyMCt0acQGgdapbUb0JGO287r+jSwFMvVvjiBfc=; b=WrEfOrw4oFw5gOFCmazMeUUxEjUr97hXQOfrqhAvzihKqlVD7aayPI4gB+GL22CIr1 td7kZg3CjzyFz1WoEimfdWc7L9rfjJMiGSJ5UzqEysHSYWsU2o9GvJ9E02UCfvc7omRd LYS4si/PsqbQTkmegfl48e7V/UODdXM6Lbocb8QGjdBmhtVY4RSGSUeux7dUuK4EsTYe 1HWhQQoZGtkjq/lQJtYgogYb7ofWXGL5vD6FXXe/syfNZWPfpFrLu0IX53DOae3UK9vl Ga8LtPDQIlIYnkt+47FIwfBsCh/ob8meZY7Ak1kWTGr0Kcv835228+PkOYw2hKTuLXkZ RNFA== X-Gm-Message-State: APjAAAU03puV+cbfgS6EfmsJyoyDMC/AWSbWl/+IFAA9U3WHEjKmCUz1 FOlt/xp5UCFy9hb2v/fUfSVPMw== X-Google-Smtp-Source: APXvYqwEbOuF39Wb4K/x+tyTYzQSzwOyWY+CjG8LIk+D5U8bvRoVFeCNf7IpVVp1TUcPnn6XkrWAXA== X-Received: by 2002:adf:f309:: with SMTP id i9mr4518426wro.258.1554907305779; Wed, 10 Apr 2019 07:41:45 -0700 (PDT) Return-Path: Received: from [10.201.33.53] ([195.166.127.210]) by smtp.gmail.com with ESMTPSA id y1sm103580357wrd.34.2019.04.10.07.41.44 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Wed, 10 Apr 2019 07:41:44 -0700 (PDT) Subject: Re: [edk2-devel] Building EDK2 code on arm64 (aarch64) - BaseTools fails To: devel@edk2.groups.io, rebecca@bluestop.org References: From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Cc: Ard Biesheuvel , Laszlo Ersek Message-ID: Date: Wed, 10 Apr 2019 16:41:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 4/10/19 6:57 AM, Rebecca Cran via Groups.Io wrote: > Is there any expectation that EDK2 will build on non-x86 systems? I have no problem using Ubuntu Bionic on Aarch64 using the default GCC. $ lsb_release -cd Description: Ubuntu 18.04.2 LTS Codename: bionic $ uname -ms Linux aarch64 $ gcc -v gcc version 7.3.0 (Ubuntu/Linaro 7.3.0-27ubuntu1~18.04) > I tried building BaseTools (from git master, > ae2fb9ead47b5abaf2a4e815b5f57c8f4838b221) using GCC 8.2 on a SoftIron > OverDrive 1000 (running FreeBSD) but there are lots of errors, such as: > > > gcc  -c  -I .. -I ../Include/Common -I ../Include/ -I > ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/Arm/  > -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror > -Wno-deprecated-declarations -Wno-stringop-truncation -Wno-restrict > -Wno-unused-result -nostdlib -g -O2  BasePeCoff.c -o BasePeCoff.o > BasePeCoff.c: In function 'PeCoffLoaderGetPeHeader': > BasePeCoff.c:120:49: error: cast from pointer to integer of different > size [-Werror=pointer-to-int-cast] >    *PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) > ((UINTN)ImageContext->Handle + ImageContext->PeCoffHeaderOffset); >                                                  ^ > BasePeCoff.c:120:12: error: cast to pointer from integer of different > size [-Werror=int-to-pointer-cast] >    *PeHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *) > ((UINTN)ImageContext->Handle + ImageContext->PeCoffHeaderOffset); >             ^ > BasePeCoff.c: In function 'PeCoffLoaderImageAddress': > BasePeCoff.c:551:10: error: cast to pointer from integer of different > size [-Werror=int-to-pointer-cast] >    return (UINT8 *) ((UINTN) ImageContext->ImageAddress + Address); >           ^ This doesn't look like an architecture problem. It seems your GCC version isn't checked correctly by BaseTools. This warning is supposed to be disabled, see: StdLib/LibC/Stdio/Stdio.inf: GCC:*_*_*_CC_FLAGS = -fno-builtin -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -Wno-format