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 1g74r6-0004xe-Ej for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Oct 2018 20:31:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g74r1-00025y-A0 for pgsql-bugs@arkaria.postgresql.org; Mon, 01 Oct 2018 20:31:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g74qz-00025H-9e for pgsql-bugs@lists.postgresql.org; Mon, 01 Oct 2018 20:31:43 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g74qr-00053W-60 for pgsql-bugs@lists.postgresql.org; Mon, 01 Oct 2018 20:31:36 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id A9FEB2209E; Mon, 1 Oct 2018 16:31:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 01 Oct 2018 16:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=5vDxrnTkF4ji7ciIaK5oGOxKm1YZeT5OVn3wiblnxiY=; b=YM/emfZ0 V4HCopsoth0FxJd394ioaG4fWFYdW+2Ash/ZPRkOaipQLuljROmbAr1Apsscur5B rlbW8F/pj/IpsOxpRRUmYnJoThIcMu2tXVlYPpAYm5KfJUxuj5izKKFIlsJmi7CU 7TVWwid87ZgvxTgoxVlWjHzP+vKYE5zQtOwvgf/M+eXcqjDG56VoBa0/+q12d7QW D7KbeQVhfC+Nw4sYtUKGVhwg964S9a1Px4l6eCRxRfuWcxqelGE6IE7eNMCkUMWj u0ZtyB99+YcHLHJORMU65hbNwd9N1PxWUJrV4xLZuGdBZrfATKwtIDBAbyqGYZU6 CQM7GRaLE3SIvg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; bh=5vDxrnTkF4ji7ciIaK5oGOxKm1YZe T5OVn3wiblnxiY=; b=UZATyfe93MCZNSrSvsHQVjz/5wd2Y3ywH/ff9/10UfsuB 9p0t3aRKFZwOrwJxNDfO7fpDcZIOwSVwFwMoowbzp1BZFVdq3vB5QZGqtE8SDhJz JxqO31IVm7F8794Q+v1dsp92pbW6AAISnCQvNMyqJlOwrle+7qkOiLhD8/4811gt gKB7iY48YLBz94q947OVc1X66GLcCkop7yBAN5aIUs+dHj4NI51AK1PJ3EH93Ka3 5Wf2juiGvYnNcvX2g0oKWAFO0GperQccGBKtj6TO541I8QgY6vj1jq9SV8yh59di V7zSBlJ38+/1psrBLA3kQYo9CaZBudw85hZez79iw== X-ME-Sender: X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id E5212E4179; Mon, 1 Oct 2018 16:31:29 -0400 (EDT) Date: Mon, 1 Oct 2018 13:31:28 -0700 From: Andres Freund To: code@legitimatesounding.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15414: extension compilation fails when c++ files are named with .cc Message-ID: <20181001203128.hszyqe7g7jybxdrf@alap3.anarazel.de> References: <15414-df6868d261e60784@postgresql.org> <20181001202548.tt6xc2aqu3phakly@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181001202548.tt6xc2aqu3phakly@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2018-10-01 13:25:48 -0700, Andres Freund wrote: > On 2018-10-01 19:46:03 +0000, PG Bug reporting form wrote: > > The following bug has been logged on the website: > > > > Bug reference: 15414 > > Logged by: Jerry Sievert > > Email address: code@legitimatesounding.com > > PostgreSQL version: 11beta4 > > Operating system: any > > Description: > > > > when --with-llvm is configured, compiling c++ extensions that use .cc and > > not .cpp fail with no rule to create .bc files. > > We currently have two rules to compile .bc files from source code: > > src/Makefile.global.in > > %.bc : %.c > $(COMPILE.c.bc) -o $@ $< > > %.bc : %.cpp > $(COMPILE.cxx.bc) -o $@ $< > > I'm a bit worried that supporting extensions that PG itself doesn't use > - and thus necessarily built by a buildsystem that's not just PGXS - > will be a, let's say iterative, process. Before v11 there wasn't a C++ > integration PGXS wise, so extensions really can't be faulted for > developing their own PGXS extensions. > > I guess we have two choices: > 1) Add rules for ".cpp", ".cc", ".C", ".cxx", and ".c++" and whatever > else we can think of. Add additional variants whenever somebody > presents one (and backpatch it). > 2) Insist that pg extensions follow PGXS rules, which atm are to use > .cpp for c++ source files. > > I don't really have an opinion here. Just to be clear, every extension can avoid that by just adding something like: %.bc : %.cxx $(COMPILE.cxx.bc) -o $@ $< To their makefile. It appears in plv8's case that additionally required modifications to include some additional compiler flags - but that's pretty fundamentally something we can't solve. If PGXS should know about some compiler flags, it needs to be told via PG_CPPFLAGS et al. - Andres