From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 785B5C433EF for ; Thu, 3 Feb 2022 16:43:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A0D8A81DCA; Thu, 3 Feb 2022 17:43:12 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="L6PTF9kO"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 676D082A6C; Thu, 3 Feb 2022 17:43:11 +0100 (CET) Received: from mail-qv1-xf2a.google.com (mail-qv1-xf2a.google.com [IPv6:2607:f8b0:4864:20::f2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A8A7F819A2 for ; Thu, 3 Feb 2022 17:43:07 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2a.google.com with SMTP id s7so379939qvb.0 for ; Thu, 03 Feb 2022 08:43:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=yg0pWkgvcijVGW44XMFWK0bev8fVvDWMUl4p/yAEauM=; b=L6PTF9kOq03KUroNJFbg8Yv6Ma4EqieV+OM+eqJ5obj1tpv3aGdNu0CTcfjMlwy73D C8P4ZP3+N+cWX7NdONhplEKfpjw2f9A/9YVKT9WTSLHH3uUj1O3kx6gFZoDFGNIbFNWg NToGUNpxiLmBVGogT0zzks7+xzJsBLokQO3b4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=yg0pWkgvcijVGW44XMFWK0bev8fVvDWMUl4p/yAEauM=; b=vWLDEwUiNsCdd0J0haUEx1xe4VaUtXtlRPVDVv0bFBZ9AT8htonYxn8VDrXsSQ4CRt /WLsMakIPpAj2UC6RqNb8IkEGKNsNcT7Y/h5NyzklXAbJTLisLlrVAtJJtx9ojLj0d5y 8aaLsHggNmlUlh7ze2ank8Rtq3WB+rCAOBGzZH4LahtHqGP67CDgqgtYo53hm9U7O9ow lz5cM9Q4joVoaNDG+nVJ5ZnFe5rHRYxhJjnJTDLw3gX3jgAT89HE1Hg+eolsU8ckj5cu HMRcIJgdf0tkUUk6l6IdUtkL/qbXO7HSpu7+p2YLzftBtd/EfKaRnae+0y4byPXgvFdS LGkQ== X-Gm-Message-State: AOAM532Tq4gXlc6RJz7CXppyrKk8wdQbblhkO2prrB9hx8S9aa+fchnF 64s3UaH6ziAFG13XiAaONPVCtg== X-Google-Smtp-Source: ABdhPJzAsI9EMUcunMeKWMbU8vuCm//n6NGkgFrsrE+UUNxM1rVko3UoZXs5H96Z9fQRfG+115jemA== X-Received: by 2002:ad4:5de4:: with SMTP id jn4mr31270310qvb.23.1643906586432; Thu, 03 Feb 2022 08:43:06 -0800 (PST) Received: from bill-the-cat (2603-6081-7b01-cbda-2ef0-5dff-fedb-a8ba.res6.spectrum.com. [2603:6081:7b01:cbda:2ef0:5dff:fedb:a8ba]) by smtp.gmail.com with ESMTPSA id 31sm13524524qta.84.2022.02.03.08.43.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Feb 2022 08:43:05 -0800 (PST) Date: Thu, 3 Feb 2022 11:43:03 -0500 From: Tom Rini To: Milan =?utf-8?Q?P=2E_Stani=C4=87?= Cc: Simon Glass , Heinrich Schuchardt , U-Boot Mailing List Subject: Re: [PATCH] sandbox: fix build failure with musl and SDL Message-ID: <20220203164303.GU7515@bill-the-cat> References: <20220121170003.363500-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Dncj+IwC/iyYwPCk" Content-Disposition: inline In-Reply-To: X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean --Dncj+IwC/iyYwPCk Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 03, 2022 at 02:02:47PM +0100, Milan P. Stani=C4=87 wrote: > Hi, >=20 > On Thu, 2022-01-27 at 14:35, Simon Glass wrote: > > Hi, > >=20 > > On Fri, 21 Jan 2022 at 13:11, Milan P. Stani=C4=87 wr= ote: > > > > > > Hi, > > > > > > it works and build pass without error or warning. > > > Tested on alpine edge aarch64 bare metal. > > > > > > Thank you > > > > > > On Fri, 2022-01-21 at 18:00, Heinrich Schuchardt wrote: > > > > sdl.c is compiled against the SDL library. > > > > > > > > Trying to redefine wchar_t with -fshort-wchar is not necessary > > > > and leads to build failures when compiling against musl. > > > > > > > > Cc: Milan P. Stani=C4=87 > > > > Signed-off-by: Heinrich Schuchardt > > > > > > Tested-by: Milan P. Stani=C4=87 > > > > > > > --- > > > > arch/sandbox/Makefile | 7 +++++++ > > > > arch/sandbox/cpu/Makefile | 11 ++++++++--- > > > > 2 files changed, 15 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile > > > > index f6cf859f24..0bdd322f12 100644 > > > > --- a/arch/sandbox/Makefile > > > > +++ b/arch/sandbox/Makefile > > > > @@ -4,3 +4,10 @@ head-y :=3D arch/sandbox/cpu/start.o arch/sandbox/= cpu/os.o > > > > head-$(CONFIG_SANDBOX_SDL) +=3D arch/sandbox/cpu/sdl.o > > > > libs-y +=3D arch/sandbox/cpu/ > > > > libs-y +=3D arch/sandbox/lib/ > > > > + > > > > +# sdl.c fails to compile with -fshort-wchar using musl. > > > > +cmd_cc_sdl.o =3D $(CC) $(filter-out -nostdinc -fshort-wchar, \ > > > > + $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $< > > > > + > > > > +$(obj)/sdl.o: $(src)/sdl.c FORCE > > > > + $(call if_changed_dep,cc_sdl.o) > > > > diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile > > > > index de7fe7f391..b74c866e56 100644 > > > > --- a/arch/sandbox/cpu/Makefile > > > > +++ b/arch/sandbox/cpu/Makefile > > > > @@ -7,7 +7,7 @@ > > > > > > > > obj-y :=3D cache.o cpu.o state.o > > > > extra-y :=3D start.o os.o > > > > -extra-$(CONFIG_SANDBOX_SDL) +=3D sdl.o > > > > +extra-$(CONFIG_SANDBOX_SDL) +=3D sdl.o > > > > obj-$(CONFIG_SPL_BUILD) +=3D spl.o > > > > obj-$(CONFIG_ETH_SANDBOX_RAW) +=3D eth-raw-os.o > > > > > > > > @@ -19,8 +19,6 @@ cmd_cc_os.o =3D $(CC) $(filter-out -nostdinc, \ > > > > > > > > $(obj)/os.o: $(src)/os.c FORCE > > > > $(call if_changed_dep,cc_os.o) > > > > -$(obj)/sdl.o: $(src)/sdl.c FORCE > > > > - $(call if_changed_dep,cc_os.o) > > > > > > > > # eth-raw-os.c is built in the system env, so needs standard inclu= des > > > > # CFLAGS_REMOVE_eth-raw-os.o cannot be used to drop header include= path > > > > @@ -30,3 +28,10 @@ cmd_cc_eth-raw-os.o =3D $(CC) $(filter-out -nost= dinc, \ > > > > > > > > $(obj)/eth-raw-os.o: $(src)/eth-raw-os.c FORCE > > > > $(call if_changed_dep,cc_eth-raw-os.o) > > > > + > > > > +# sdl.c fails to build with -fshort-wchar using musl > > > > +cmd_cc_sdl.o =3D $(CC) $(filter-out -nostdinc -fshort-wchar, \ > > > > + $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $< > > > > + > > > > +$(obj)/sdl.o: $(src)/sdl.c FORCE > > > > + $(call if_changed_dep,cc_sdl.o) > > > > -- > > > > 2.33.1 > > > > > >=20 > > This fails on gitlab. > >=20 > > https://source.denx.de/u-boot/custodians/u-boot-dm/-/jobs/382812 > >=20 > > $ tools/buildman/buildman -o ${UBOOT_TRAVIS_BUILD_DIR} -w -E -W -e > > --board ${TEST_PY_BD} ${OVERRIDE} > > Building current source for 1 boards (1 thread, 40 jobs per thread) > > sandbox: + sandbox > > +/usr/bin/ld: error: LLVM gold plugin: linking module flags > > 'wchar_size': IDs have conflicting values in 'arch/sandbox/cpu/sdl.o' > > and 'ld-temp.o' > > +clang: error: linker command failed with exit code 1 (use -v to see in= vocation) > > +make[1]: *** [Makefile:1799: u-boot] Error 1 > > +make: *** [Makefile:177: sub-make] Error 2 > > 0 0 1 /1 sandbox > > Completed: 1 total built, duration 0:00:22, rate 0.05 > > Running after_script > >=20 > >=20 > > Please can you take a look? >=20 > I tested with clang and lld, and clang ld.gold in lxc and bare metal > build. didn't had this errors. >=20 > Could be that this problem appears on docker only. Docker is just an Ubuntu/Focal environment, so gcc + ld.gold here. --=20 Tom --Dncj+IwC/iyYwPCk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmH8BhQACgkQFHw5/5Y0 tywKlQv9FzLdWtrsdrH/BkiLlgff6E6hoqzTRjtJrPyFVr66A62R3+QYPtzCfmX4 btvvllFtLFkm1c2tcAeMgdPkh/99nDyM5NtDS7X4LhQGSipR/nwzIazvVB6V8XxG vPKipqRO3QxSWpEUx5areLUAOJNjdB6tbf3UvoNUApCzAjrD8ucBqRRKN6b+u3Qe d1Gf24I9SNdQ9y/5wN4FReQVs8tEyPH0EnB1YADn4ufeje8c8sTusdQzyh5kj5G/ +WoPZN7lkgPQ1g+jlwkt27s17C8vhDlUcj8EG264+IFVRqwlb30VTurfLwX1Z5Iw JSUGqGiIHXH7PXF2QJKkOY6PEv2IfQL18k5Yl6brmUsgZUjC8WMUjMllmPoIf7Kf fYlanNGEyw0VXu3VM78H2YAnDVDLGe1dwTVVTZBVqK2bjKOjvORKbZvqDJHGuV5I glzNOW4u/whMZjsl4tpTkrQRAwGr2NvHieDgtAWqVMJR5aiCTKn+r4oRwT+C0YB4 B75xqicE =9dzz -----END PGP SIGNATURE----- --Dncj+IwC/iyYwPCk--