Commit Graph

30 Commits

Author SHA1 Message Date
Tom Lane 44273ce4f6 Select CFLAGS_SL at configure time, not in platform-specific Makefiles.
Move the platform-dependent logic that sets CFLAGS_SL from
src/makefiles/Makefile.foo to src/template/foo, so that the value
is determined at configure time and thus is available while running
configure's tests.

On a couple of platforms this might save a few microseconds of build
time by eliminating a test that make otherwise has to do over and over.
Otherwise it's pretty much a wash for build purposes; in particular,
this makes no difference to anyone who might be overriding CFLAGS_SL
via a make option.

This patch in itself does nothing with the value and thus should not
change any behavior, though you'll probably have to re-run configure
to get a correctly updated Makefile.global.  We'll use the new
configure variable in a follow-on patch.

Per gripe from Kyotaro Horiguchi.  Back-patch to all supported branches,
because the follow-on patch is a portability bug fix.

Discussion: https://postgr.es/m/20191010.144533.263180400.horikyota.ntt@gmail.com
2019-10-21 12:32:35 -04:00
Peter Eisentraut d50966a49d Move forgotten comment closer to where it matters. 2008-10-29 16:23:07 +00:00
Peter Eisentraut 79d306c84a Support for Sun Studio compiler on Linux
This basically takes some build system code that was previously labeled
"Solaris" and ties it to the compiler rather than the operating system.

Author: Julius Stroffek <Julius.Stroffek@Sun.COM>
2008-10-29 16:06:47 +00:00
Bruce Momjian e81b7b1dac Remove extra 'else' in solaris compiler code. 2006-04-28 04:32:10 +00:00
Bruce Momjian 128bed948f Rewrite Solaris compiler tas() assembly routines, merge i386 and x86_64
assembler files, renamed as solaris_x86.s.

Theo Schlossnagle
2006-04-27 22:28:42 +00:00
Bruce Momjian bb1bba8eca Remove unnecessary assignment, per Tom. 2006-01-02 03:30:41 +00:00
Bruce Momjian 12af9cdff4 Add support for Solaris x86_64 using Sun's compiler.
Pierre Girard
2005-12-30 21:43:41 +00:00
Tom Lane 507b758ad9 It appears we need -DSUNOS4_CC for both solaris and sunos4 templates.
Per report from Andrew Clark.
2005-07-29 17:00:29 +00:00
Bruce Momjian f7bae20d67 Don't bother adding to cflags/cppflags, just set them because configure
handles that, and make solaris debug use no optimization.
2004-12-02 18:11:40 +00:00
Bruce Momjian 3aa9776d95 Add to CPPFLAGS/CFLAGS in template files, don't over-ride them. 2004-11-27 05:03:26 +00:00
Tom Lane 409b38f514 Fix TAS assembly stuff for Solaris/386. (I'm not in a position to
actually test this, but it couldn't be broken any worse than it was...)
2004-09-24 00:21:32 +00:00
Bruce Momjian 30a06fe2c4 Unconditionally define:
-D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS

for all ports.  It can't hurt if they are not supported, but it makes
our job easier for porting.

Should fix Darwin compile and other platforms without mucking with the
thread detection code.
2004-04-26 04:04:42 +00:00
Bruce Momjian 7a66015e98 Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
2004-04-23 18:15:55 +00:00
Bruce Momjian 79b805f6d5 Add -D_REENTRANT for Solaris threading. 2004-03-26 18:24:08 +00:00
Bruce Momjian fda3449625 Update gcc solaris flags. 2004-03-25 22:12:37 +00:00
Bruce Momjian 08c0aa7281 Add mention of "-D_POSIX_PTHREAD_SEMANTICS" enabling 5-arg getpwuid_r(). 2004-03-22 01:50:31 +00:00
Bruce Momjian 64fe1fd239 Update Solaris thread flags, per Jim Seymour 2004-03-14 23:51:48 +00:00
Bruce Momjian c6f0559371 Check and set thread-safe functions separately, rather than as a single
variable.

Remove thread locking for non-thread-safe functions, instead throw a
compile error.

Platforms will have to re-run tools/thread to record their thread
safety.
2004-02-11 21:44:06 +00:00
Bruce Momjian 77f140008b Fix Solaris thread build settings for non-gcc compilers. 2004-01-08 04:24:24 +00:00
Bruce Momjian 8042c79fd1 Make Solaris non-gcc thread flag "-mt" a compile flag, not a link flag. 2003-12-31 16:14:44 +00:00
Bruce Momjian cf4d324d02 Add "-mt" link flag for Solaris non-gcc compiles when using threads ---
required.
2003-12-30 23:13:51 +00:00
Tom Lane baee5f75c5 Push responsibility for selecting out-of-line-assembler TAS code out to
the platform template files, instead of doing it directly in configure.in.
This seems cleaner, and also opens the door to making the choice be
dependent on the compiler being used.
2003-12-23 18:40:53 +00:00
Peter Eisentraut 378f59904a Fix CFLAGS selection to actually work. Add test to detect whether gcc's
option -fno-strict-aliasing is available.
2003-10-25 15:32:11 +00:00
Bruce Momjian 7185455c08 Make template CFLAGS handling consistent. 2003-10-09 14:40:37 +00:00
Bruce Momjian 0e22cb1232 This centralizes the optimization defaults into configure.in, rather
than having CFLAGS= in the template files.

It uses -O2 for gcc (generated by autoconf), and -O for non-gcc, unless
the template overrides it.
2003-10-09 03:20:34 +00:00
Bruce Momjian 391dceb462 Finalize configuration of thread_test program. 2003-09-27 16:24:45 +00:00
Bruce Momjian 227dd9b427 Rename thread compile flag. Move thread test program to tools/thread,
and improve tests.
2003-09-27 15:32:48 +00:00
Bruce Momjian b041d3e3a1 Attempt threading in this order:
*      use non-*_r function names if they are all thread-safe
 *          (NEED_REENTRANT_FUNCS=no)
 *      use *_r functions if they exist (configure test)
 *      do our own locking and copying of non-threadsafe functions

New to this patch is the last option.
2003-09-13 14:49:51 +00:00
Peter Eisentraut f8ff1ee5aa Move DLSUFFIX, AROPT, and CFLAGS_SL settings from template to
Makefile.port, since they are of no use to configure and much of the
library magic happens in Makefile.port anyway.

Use __alpha, not __alpha__, since the former is universally available.
Remove -DNOFIXADE from the compile command line and put it in the port
include file.
2000-10-21 22:36:14 +00:00
Peter Eisentraut 4d76a801c6 Unify solaris_i386 and solaris_sparc templates. They were almost identical
anyway, the rest being due to them not being kept in sync.  Add configure
test for lorder and use it (on Solaris) when found.
2000-10-10 21:22:29 +00:00
Renamed from src/template/solaris_sparc (Browse further)