Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well
Дата
Msg-id 20190131021911.GG16781@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Pass COPT and PROFILE to CXXFLAGS as well  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Jan 30, 2019 at 08:18:31PM -0500, Tom Lane wrote:
> This looks a bit copy-and-paste-y to me, in particular no thought
> has been taken for the order of flags.  We found in configure that
> it's better to add user-specified CFLAGS at the *end*, even though
> injecting user-specified CPPFLAGS at the beginning is the right
> thing.  This is because in, eg, "-O2 -O0" the last flag wins.
> Presumably the same goes for CXXFLAGS.  I think it's right to
> put user LDFLAGS first, though.  (The argument for CPPFLAGS and
> LDFLAGS is that you want the user's -I and -L flags to go first.)

Ah yes, good point about CFLAGS and LDFLAGS.  It would be better to
add a comment about that and document the difference, aka "prepend" or
"append" the flag values.

CXXFLAGS applies to compiler options like -g -O2 which you would like
to enforce for the C++ compiler, so it seems to me that like CFLAGS
the custom values should be added at the end and not at the beginning,
no?
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: A few new options for vacuumdb
Следующее
От: "Bossart, Nathan"
Дата:
Сообщение: Re: A few new options for vacuumdb