Search Postgresql Archives

Re: Using different GCC, CFLAGS, CCFLAGS and CPPFLAGS to compile Postgres and PostGIS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



postgres user <postgresuser1989@xxxxxxxxx> writes:
> What can go wrong or is it acceptable if I build Postgres from source with
> let's say GCC 4.x.y and some specific CFLAGS, CPPFLAGS and CCFLAGS and when
> I try to install an extension for Postgres such as PostGIS using a
> different version of GCC lets say GCC 4.x.z with varying CFLAGS, CCFLAGS
> and CPPFLAGS and if I follow the same process for other non-contrib
> extensions? I want to know the theory behind this and it would serve me a
> great help to understand the systems aspect of the process as well.

You could certainly break things that way if you tried hard enough.
"Hard enough" would involve, say, selecting compiler flags that alter
ABI details like function calling conventions or struct packing rules.
Then the code in the extension would expect to call or be called
differently than the code in the core server expects to do it, or
would believe that structs declared in core server header files are
laid out differently than the code in the core server thinks, etc.

Using a different compiler would matter if it wasn't ABI-compatible with
the compiler used for the core code.  Usually, vendor-supplied compilers
for different C variants are all configured to be ABI-compatible on a
given platform; but again you could break it if you tried hard enough,
like say using a home-built compiler that you'd configured randomly
differently from the platform's default compiler.

It would be more useful to ask about specific changes you want to make
in the compiler and flag choices (and explaining why you want to make
those specific changes wouldn't be a bad thing either).

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux