|
7 | 7 | #
|
8 | 8 | #
|
9 | 9 | # IDENTIFICATION
|
10 |
| -# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.67 1996/11/14 00:26:23 momjian Exp $ |
| 10 | +# $Header: /cvsroot/pgsql/src/Attic/Makefile.global,v 1.68 1996/11/14 07:19:26 bryanh Exp $ |
11 | 11 | #
|
12 | 12 | # NOTES
|
13 | 13 | # Essentially all Postgres make files include this file and use the
|
@@ -133,12 +133,8 @@ OIDNAMELEN= 36
|
133 | 133 | # Compile libpq++
|
134 | 134 | #HAVE_Cplusplus= true
|
135 | 135 |
|
136 |
| -# Set COPT to -O for optimization, or -g for debuggable binaries |
137 |
| -# Many people prefer -O2, and -m486 if you are using a i486 or better |
138 |
| -# Use -Werror to stop the compile when any warnings occur |
139 |
| -COPT= -O #-Werror |
140 | 136 |
|
141 |
| -# Commenting out CASSERT will make things go about 10% faster, but you will |
| 137 | +# Commenting out CASSERT will make things go a LOT faster, but you will |
142 | 138 | # also loose a lot of useful error-checking.
|
143 | 139 | CASSERT= true
|
144 | 140 |
|
@@ -554,8 +550,6 @@ endif
|
554 | 550 | ifeq ($(PORTNAME), irix5)
|
555 | 551 | MK_PORT= irix5
|
556 | 552 |
|
557 |
| -CC= cc |
558 |
| - |
559 | 553 | CFLAGS_BE+= -DUSE_POSIX_SIGNALS
|
560 | 554 |
|
561 | 555 | # RANLIB is not used on IRIX 5
|
@@ -596,6 +590,8 @@ LDFLAGS+= -rdynamic
|
596 | 590 | endif
|
597 | 591 | MK_NO_LORDER= true
|
598 | 592 |
|
| 593 | +CC= gcc |
| 594 | + |
599 | 595 | # use the regex library
|
600 | 596 | USE_REGEX= 1
|
601 | 597 |
|
@@ -740,10 +736,48 @@ endif
|
740 | 736 | # This goes here so that customization in Makefile.custom is effective
|
741 | 737 | ##############################################################################
|
742 | 738 | #
|
743 |
| -# Flags for CC and LD. (depend on COPT and PROFILE) |
744 |
| -# |
| 739 | +# Flags for CC and LD. |
| 740 | + |
| 741 | +############################################################################## |
| 742 | +# COPT |
| 743 | +# |
| 744 | +# COPT is for options that the sophisticated builder might want to vary |
| 745 | +# from one build to the next, like options to build Postgres with debugging |
| 746 | +# information included. COPT is meant to be set on the make command line, |
| 747 | +# for example with the command "make COPT=-g". The value you see set here |
| 748 | +# is the default that gets used if the builder does not give a value for |
| 749 | +# COPT on his make command. |
| 750 | +# |
| 751 | +# There is a nonobvious relationship between -O (optimization) and |
| 752 | +# -Werror (consider all warnings fatal). On some systems, if you don't |
| 753 | +# optimize, you will always get some warnings because the system header |
| 754 | +# files will include some unreferenced functions in the code. These are |
| 755 | +# functions that are supposed to be inline, so there wouldn't ordinarily |
| 756 | +# be an "unreferenced" problem, but if you don't enable optimization, no |
| 757 | +# inlining can happen, and hence the problem. Therefore, we include |
| 758 | +# if you override -O, you override -Werror as well. |
| 759 | +# |
| 760 | +# CUSTOM_COPT is something the user may set in Makefile.custom |
| 761 | + |
| 762 | +# Common values for COPT are: -g for debuggable binaries, -m486 if you are |
| 763 | +# using a i486 or better. |
| 764 | + |
| 765 | +ifneq ($(CUSTOM_COPT),) |
| 766 | +COPT= $(CUSTOM_COPT) |
| 767 | +else |
| 768 | +ifeq ($(CC), gcc) |
| 769 | +COPT= -O2 -Werror |
| 770 | +else |
| 771 | +COPT= -O |
| 772 | +endif |
| 773 | +endif |
| 774 | + |
| 775 | + |
| 776 | +ifeq ($(CC), gcc) |
| 777 | +# Some flags only gcc recognizes... |
745 | 778 | # PostgreSQL should *always* compile with these enabled
|
746 | 779 | CFLAGS+= -Wall -Wmissing-prototypes
|
| 780 | +endif |
747 | 781 |
|
748 | 782 | # Globally pass debugging/optimization/profiling flags based
|
749 | 783 | # on the options selected above.
|
|
0 commit comments