From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web10.11089.1681483075610536155 for ; Fri, 14 Apr 2023 07:37:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RNdyC3W5; spf=pass (domain: redhat.com, ip: 170.10.129.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1681483074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tAQErqWoCZwdxlPi6chTAe4TVNR7DgG1AVZYd7L2Ztw=; b=RNdyC3W5hyPTA3M83W0WYxzSPpk6jmKZMd/Fn4N2kUBXDMdKadkyDQOVFu2maDyOT1LAPM FYEjadjI59jTvuqcRH/edfl9MMe0hfFoH8h1PTowxpSbFlWjJ5XUKDumUp1uco0Th1Rygb Rf7X5jvs4QyszCLIvdgGAiBLZt5mZFg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-649-NM959tmUMWW8Uoy4GyMgrA-1; Fri, 14 Apr 2023 10:37:50 -0400 X-MC-Unique: NM959tmUMWW8Uoy4GyMgrA-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1205E1C087AF; Fri, 14 Apr 2023 14:37:50 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 07AF340C6E70; Fri, 14 Apr 2023 14:37:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB5A11800081; Fri, 14 Apr 2023 16:37:44 +0200 (CEST) Date: Fri, 14 Apr 2023 16:37:44 +0200 From: "Gerd Hoffmann" To: Marvin =?utf-8?Q?H=C3=A4user?= 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 Subject: Re: [PATCH v4 01/10] BaseTools: add BASETOOLS define Message-ID: References: <20230414080250.1357004-2-kraxel@redhat.com> <18EC1A6E-8B81-4564-83A5-DA8EC2BA54ED@posteo.de> MIME-Version: 1.0 In-Reply-To: <18EC1A6E-8B81-4564-83A5-DA8EC2BA54ED@posteo.de> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit On Fri, Apr 14, 2023 at 12:29:21PM +0000, Marvin Häuser wrote: > Hi Gerd, > > Thanks for your effort! > > Sorry, but I *really* dislike this “BASETOOLS” notion. There 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 “HOST_OS” or “USERLAND” or something (I’m bad > with names :) ). I'm certainly open to better naming ideas. Underlying problem is that x64 ProcessorBind.h sets visibility to hidden (anyone knows why?). 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). 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 ... > Speaking of host-based unit tests, why are they not affected by the > issue? 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. take care, Gerd