Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5tBu-0007cU-Mw for pgsql-committers@arkaria.postgresql.org; Fri, 28 Sep 2018 13:52:23 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g5tBt-0005a0-BA for pgsql-committers@arkaria.postgresql.org; Fri, 28 Sep 2018 13:52:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g5tBX-0003r9-8W for pgsql-committers@lists.postgresql.org; Fri, 28 Sep 2018 13:51:59 +0000 Received: from mail-yw1-xc44.google.com ([2607:f8b0:4864:20::c44]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1g5tBT-0006MU-9v for pgsql-committers@lists.postgresql.org; Fri, 28 Sep 2018 13:51:57 +0000 Received: by mail-yw1-xc44.google.com with SMTP id h134-v6so2628864ywc.9 for ; Fri, 28 Sep 2018 06:51:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding:content-language; bh=/6SUd1G2jFC9RJDrZk7uG3GHV+BjzxY/jwTcJHiqWa8=; b=pGMxv+3QH+87WcYQgfkymqABEW9IzSx7ZJ5TUg0e+7UJMLh7C5BOBmr1uhIfeQ2AlS aXmdAci+5pijbFuD0mcYjHT0qB0F4eTmVb23+7zMHfu9qtYrydZPHAd8RcTt6IHun4E3 MFvxs9QZrPj4o9XW6rlZsYqIVmy62QMdKFZFgbOPaKfToyz7frptcMb1K3BJYiv1WPb4 q6BaG+3TfX7RGRqcS9V7r8i7TvAvW3L8q9tWcZWgXlvcWGe7DlP2m7fBj2CvFa5oVm56 V+qnKY2AVINJM3tvpx249IUpjHjBX0RoRV+ravzAPYIpkwKWKtQOd+ERJJFyCz8sDE8g BQqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=/6SUd1G2jFC9RJDrZk7uG3GHV+BjzxY/jwTcJHiqWa8=; b=eUKjdpYkIEzOVcKUexgi78RArH2J00ukDtgfEYaKUCjS0OtIFg+IMXCGgX5iF7Q/lV Cq7JUsq8F02tnFx/XR8oxhfM/rT0phs3jOn6wzvaoq7yPLJxJ6Xrd1C/yg1EFfcmkkIq sV5HahBfzE6LfNdtRyHtGMsbaWnEwB6UWRna9zjD0QxpLM6UliTSYdX2rtINRuejyL3m i9GT/P3WoiOC+Pzoiz64rjAgEtMfSwwkUlqgPAx8XgSW2kLVAweDHHczXMNrzZLGH0J+ YSHNwrI8Dwoix+l6BHr63fhzChWay7xSJF/IIjD/TqwxTA90Vfn1v64xtsTu0fgODGBW /uxQ== X-Gm-Message-State: ABuFfoiSYpv9dQamhcye/iVWtVIuoUYjudQGjUG5QySYud/5r235Klr1 h4jzkRsO1c2Pq4AkBA4liqr3sT0JM2e5JiRrDsZfowy+BhrzTKpUTQ0+lcChyr+4Ifvv8zC/7vc sG89ffglltUpUf7ZU5nIZdtQB0JiBHR/C9LYOHJ8iX+ISR9KAayyBSbLwIsB9aeKZNoVKodv1EL cTcELAkF1IdaZuKGR2YnAMSR6+ X-Google-Smtp-Source: ACcGV62Sh2nD3WHhb+ili327cMcvdWbCKR9d6lcUcqcQI+h9yRHNDtpt8ai0uVHGmyyEOlmS60XM6Q== X-Received: by 2002:a81:138e:: with SMTP id 136-v6mr8554838ywt.485.1538142713328; Fri, 28 Sep 2018 06:51:53 -0700 (PDT) Received: from [192.168.10.146] ([98.122.175.38]) by smtp.gmail.com with ESMTPSA id v18-v6sm2124289ywv.9.2018.09.28.06.51.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Sep 2018 06:51:52 -0700 (PDT) From: Andrew Dunstan X-Google-Original-From: Andrew Dunstan Subject: Re: pgsql: Build src/port files as a library with -fPIC, and use that in li To: Tom Lane , pgsql-committers@lists.postgresql.org References: Message-ID: <11d432a5-659e-81da-3722-513d039515e1@2ndQuadrant.com> Date: Fri, 28 Sep 2018 09:51:51 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-MW List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 09/27/2018 11:23 AM, Tom Lane wrote: > Build src/port files as a library with -fPIC, and use that in libpq. > > libpq and ecpg need shared-library-friendly versions of assorted src/port/ > and src/common/ modules. Up to now, they got those by symlinking the > individual source files and compiling them locally. That's baroque, and a > pain to maintain, and it results in some amount of duplicated compile work. > It might've made sense when only a couple of files were needed, but the > list has grown and grown and grown :-( > > It makes more sense to have the originating directory build a third variant > of libpgport.a/libpgcommon.a containing modules built with $(CFLAGS_SL), > and just link that into the shared library. Unused files won't get linked, > so the end result should be the same. > > This patch makes a down payment on that idea by having src/port/ build > such a library and making libpq use it. If the buildfarm doesn't expose > fatal problems with the approach, I'll extend it to the other cases. > Looks like we have a bunch of failures, including prairiedog. cheers andrew -- Andrew Dunstan https://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services