From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.66]) by mx.groups.io with SMTP id smtpd.web11.11671.1681483901045811139 for ; Fri, 14 Apr 2023 07:51:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@posteo.de header.s=2017 header.b=mbe6ZikH; spf=pass (domain: posteo.de, ip: 185.67.36.66, mailfrom: mhaeuser@posteo.de) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C318F24029B for ; Fri, 14 Apr 2023 16:51:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1681483898; bh=kMc8O32iRoWhCRTC35lHpuk6fPZBVCHP62JMM9l7T+w=; h=From:Subject:Date:Cc:To:From; b=mbe6ZikHNrR2kri3XXEh/xVFEX/xvnP/6+eAtP2UymTtTbAn8hYhBunVFWAsgQElL brHbB/4WcCXf7ojaZGNepRK5WcIkSgv+t5wPZT+D0VVhBZIEybWvG7Qz21uwnuqOLM uq277xsZTIFbthW3cfqefsor8VKbAYNDnKPug0tNU7kaeb339s8ghCjuWyLNIsU+yF RdF+W40BIEGBRrXndXpBExJGd4hH92e1esM1fyd/OXysNLAuCMjSuR2wn7ykRnVTJf FpeVilc9rxZacxV5hjTqKaYn/4VYnoZhKCwyJYXSpRTRZk+RwwfGkdTBqk8/SwaFbZ ryBIg9dkZXg1A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4PyfXl5nvNz9rxD; Fri, 14 Apr 2023 16:51:35 +0200 (CEST) From: =?UTF-8?B?TWFydmluIEjDpHVzZXI=?= Mime-Version: 1.0 (1.0) Subject: Re: [PATCH v4 01/10] BaseTools: add BASETOOLS define Date: Fri, 14 Apr 2023 14:51:35 +0000 Message-Id: References: Cc: devel@edk2.groups.io, Pawel Polawski , Dongyan Qian , Sunil V L , Baoqi Zhang , Chao Li , Rebecca Cran , Ard Biesheuvel , Zhiguang Liu , Liming Gao , Yuwei Chen , Leif Lindholm , Michael D Kinney , Daniel Schaefer , Bob Feng , Oliver Steffen In-Reply-To: To: Gerd Hoffmann Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable > On 14. Apr 2023, at 16:37, Gerd Hoffmann wrote: >=20 > =EF=BB=BFOn Fri, Apr 14, 2023 at 12:29:21PM +0000, Marvin H=C3=A4user wrot= e: >> Hi Gerd, >>=20 >> Thanks for your effort! >>=20 >> Sorry, but I *really* dislike this =E2=80=9CBASETOOLS=E2=80=9D notion. Th= ere might be >> external tools that also want to use the header (like we do with AUDK) >> and also edk2 supports host-based unit tests. Imo the macro name >> should be generic, like =E2=80=9CHOST_OS=E2=80=9D or =E2=80=9CUSERLAND=E2= =80=9D or something (I=E2=80=99m bad >> with names :) ). >=20 > I'm certainly open to better naming ideas. >=20 > Underlying problem is that x64 ProcessorBind.h sets visibility to > hidden (anyone knows why?). It combats some awkward ELF symbol magic (I think preemption?) which would o= therwise generate a GOT. > Seems to be fine for freestanding binaries, > but when linking host tools against shared libraries things break. For > some reason on ubuntu only, fedora works fine (both gcc and clang). Our Ubuntu CI also works with a similar change in AUDK. >=20 > Automatically detecting freestanding vs. hosted would be even better, > anyone knows whenever there is a define which can be used for this? At > least the gcc man page doesn't mention any ... Don=E2=80=99t think so. :( >=20 >> Speaking of host-based unit tests, why are they not affected by the >> issue? >=20 > Hmm, good question. Maybe they are simple enough to not need libc > symbols. Guess I should try a full test build on ubuntu, not only > building basetools. Tyvm! Best regards, Marvin >=20 > take care, > Gerd >=20