Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nXP9q-0002YR-66 for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Mar 2022 15:13:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nXP9n-00032A-BV for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Mar 2022 15:13:47 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nXP9n-0002vw-0Y for pgsql-hackers@lists.postgresql.org; Thu, 24 Mar 2022 15:13:47 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nXP9e-0006JC-8H for pgsql-hackers@postgresql.org; Thu, 24 Mar 2022 15:13:45 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 5B1C9320092B; Thu, 24 Mar 2022 11:13:35 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 24 Mar 2022 11:13:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=H60bVQvu1Hk/ATdp2sG7060FiCI2zCWWOmJaMmWrI nk=; b=TVhvp/RR/fwfBYIw0m2B5LUZtg9f/KEGxvhJ2nrzfxOHw9T/b3zyxOdci UeaL+EW8vqqeUMh5iSunr5qEfRKlEP9oiiZlXPAuZqSn7Vf4DGv0iIb0Si1iRPTz kXqdI1+KQHMwOl2b8iZyy7/62u6qoc43hR9ls45GRLgxd9ub65ejPpiSFQ6pd8ui ugFQ6m5kfJmXDWq8jqm3Z6cMtn5Gk12ho2MDkz21jRyT0AniSZmYJ3ErjEojCRDH q1Rq1h5nF5xqY0aF7DbFTpwt8Y7yy2cUz6pq+fdeURYDGZE2Wa3YCqnbaKMi8JXV eOAhEE+i0c7GLhQwfAh9U3KZKSKDg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegledgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepfeejgeehteeuhfevvedu leeufedtjeetiefftedvudfhtdeifefgueettdevgefgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Mar 2022 11:13:32 -0400 (EDT) Message-ID: <5b8d48a4-2fee-6764-7eda-a076f544ea33@enterprisedb.com> Date: Thu, 24 Mar 2022 16:13:31 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: Use -fvisibility=hidden for shared libraries Content-Language: en-US To: Andres Freund , Tom Lane Cc: Laurenz Albe , pgsql-hackers@postgresql.org References: <20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de> <20211101054700.z3jzmc5lnxlad4y7@alap3.anarazel.de> <2499085.1641859296@sss.pgh.pa.us> <20220111025328.iq5g6uck53j5qtin@alap3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20220111025328.iq5g6uck53j5qtin@alap3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11.01.22 03:53, Andres Freund wrote: > Ugh. In the case of worker_spi it's because -fvisibility=hidden isn't applied > to worker_spi.c at all. Which in turn is because Makefile.shlib isn't used at > all for MODULES= style modules just for MODULE_big= ones :(. > > Once that's "fixed" it fails as expected... > > I'm not sure what the best way to deal with this is. Just now I copied the > logic from Makefile.shlib to pgxs.mk (by the existing CFLAGS_SL use), but that > doesn't scale - there's other direct uses of CFLAGS_SL. > > Perhaps the best way would be to add the -fvisibility=hidden to CFLAGS_SL, and > work around the explicit exports issue in Makefile.shlib by adding an explicit > -fvisibility=default? Or perhaps CFLAGS_SL The easiest solution would be to change worker_spi's Makefile to use MODULE_big. There are already many cases where MODULE_big is used instead of MODULES for seemingly random reasons, so I wouldn't worry too much about it here if it helps you move forward.