If you build with pgxs it should supply the appropriate compiler flags. Alternatively, get the right settings from pg_config. In general rolling your own is a bad idea.
pgsql-hackers by date:
Соглашаюсь с условиями обработки персональных данных