[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: Location to specify C compiler option in C extension
From:       Demitri Muna <postgresql () demitri ! com>
Date:       2018-02-23 21:23:10
Message-ID: 01DB0EC9-B077-48BC-8059-B3B7EE9FD63D () demitri ! com
[Download RAW message or body]

Hi Tom,

> PG_CPPFLAGS ought to work.  One point is that you need to set that before
> including pgxs.mk; maybe it's an ordering problem?

On closer inspection, it was working, but the pg Makefile was specifically including \
"-Wdeclaration-after-statement" which I think was overriding the ‘-std=c99' part. \
The line below fixed the problem.

PG_CPPFLAGS += -std=c99 -Wno-declaration-after-statement

Thanks, sorry for the noise.

Demitri


[Attachment #3 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; \
charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; \
line-break: after-white-space;" class="">Hi Tom,<div class=""><br \
class=""><div><blockquote type="cite" class=""><div class=""><span \
style="font-family: GillSans; font-size: 12px; font-style: normal; font-variant-caps: \
normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: \
0px; text-transform: none; white-space: normal; word-spacing: 0px; \
-webkit-text-stroke-width: 0px; float: none; display: inline !important;" \
class="">PG_CPPFLAGS ought to work. &nbsp;One point is that you need to set that \
before</span><br style="font-family: GillSans; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: GillSans; \
font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; \
letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; \
white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; \
display: inline !important;" class="">including pgxs.mk; maybe it's an ordering \
problem?</span><br style="font-family: GillSans; font-size: 12px; font-style: normal; \
font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: \
start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: \
0px; -webkit-text-stroke-width: 0px;" class=""></div></blockquote></div><br \
class=""></div><div class="">On closer inspection, it was working, but the pg \
Makefile was specifically including "-Wdeclaration-after-statement" which I think was \
overriding the ‘-std=c99' part. The line below fixed the problem.</div><div \
class=""><br class=""></div><div class="">PG_CPPFLAGS += -std=c99 \
-Wno-declaration-after-statement</div><div class=""><br class=""></div><div \
class="">Thanks, sorry for the noise.</div><div class=""><br class=""></div><div \
class="">Demitri</div><div class=""><br class=""></div></body></html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic