summaryrefslogtreecommitdiff
blob: 281efa6850e95f4e9099d4272367338669525682 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
diff -NrU5 vrb-0.5.1.original/configure vrb-0.5.1/configure
--- vrb-0.5.1.original/configure	2009-08-05 19:22:47.000000000 -0600
+++ vrb-0.5.1/configure	2009-08-05 19:57:15.000000000 -0600
@@ -314,11 +314,11 @@
 #-----------------------------------------------------------------------------
 unamem=$( uname -m | tr ' ' '_' )
 unames=$( uname -s | tr ' ' '_' )
 unamer=$( uname -r | tr ' ' '_' )
 
-gcc="gcc"
+gcc=${CC}
 
 lib_cp_cmd="${gcc}"
 pgm_cp_cmd="${gcc}"
 
 lib_cc_cmd="${gcc}"
@@ -331,23 +331,23 @@
 pgm_ld_cmd="${gcc}"
 
 lib_def=( "${lib_def[@]}" "-DARCH_${unamem}" "-DARCH=${unamem}" )
 pgm_def=( "${pgm_def[@]}" "-DARCH_${unamem}" "-DARCH=${unamem}" )
 
-lib_warn=( -Werror -Wall -Wnested-externs -Wno-cast-qual -Wno-trigraphs -Wuninitialized -Wwrite-strings )
-pgm_warn=( -Werror -Wall -Wnested-externs -Wno-cast-qual -Wno-trigraphs -Wuninitialized -Wwrite-strings )
+lib_warn=(  -Wall -Wnested-externs -Wno-cast-qual -Wno-trigraphs -Wuninitialized -Wwrite-strings )
+pgm_warn=(  -Wall -Wnested-externs -Wno-cast-qual -Wno-trigraphs -Wuninitialized -Wwrite-strings )
 
 if [[ -n "${warninline}" ]]; then
     lib_warn=( "${lib_warn[@]}" -Winline )
     pgm_warn=( "${pgm_warn[@]}" -Winline )
 fi
 
-lib_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -fgnu-linker -frerun-loop-opt -finline -finline-functions -fmove-all-movables )
-pgm_feat=( -fomit-frame-pointer -funsigned-char -funsigned-bitfields -fgnu-linker -frerun-loop-opt -finline -finline-functions -fmove-all-movables )
+lib_feat="${CFLAGS} ${LDFLAGS}"
+pgm_feat="${CFLAGS} ${LDFLAGS}"
 
-lib_cp_opt=( -pipe )
-pgm_cp_opt=( -pipe )
+lib_cp_opt="${CFLAGS} ${LDFLAGS}"
+pgm_cp_opt="${CFLAGS} ${LDFLAGS}"
 
 if [[ -n "${std}" ]]; then
     lib_cp_opt=( "${lib_cp_opt[@]}" "-std=${std}" )
     pgm_cp_opt=( "${pgm_cp_opt[@]}" "-std=${std}" )
 fi
@@ -375,11 +375,11 @@
 if [[ -n "${as_verbose}" ]]; then
     lib_as_opt=( -v "${lib_as_opt[@]}" )
     pgm_as_opt=( -v "${pgm_as_opt[@]}" )
 fi
 
-lib_ld_opt=( -pipe -shared -nostdlib -nostartfiles )
+lib_ld_opt=("${CFLAGS} ${LDFLAGS}" -pipe -shared -nostdlib -nostartfiles)
 pgm_ld_opt=( -pipe )
 if [[ -n "${ld_verbose}" ]]; then
     lib_ld_opt=( -v "${lib_ld_opt[@]}" )
     pgm_ld_opt=( -v "${pgm_ld_opt[@]}" )
 fi
@@ -1266,11 +1266,11 @@
 	# Generate Makefile specs to compile library sources.
 	#----------------------------------------------------
 	class_product_src lib "${libname}" | while read srcname; do
 	    vmsg 9 "Generating Makefile section: lib ${libname} ${srcname}"
 	    srcdir=$( dirname "${srcname}" )
-	    srcref="-I ${srcdir} -I ${source}/include -I- -I ./include ${srcname}"
+	    srcref="-iquote ${srcdir} -iquote ${source}/include -I ./include ${srcname}"
 	    objname=$( echo "${srcname}" | gawk -F/ '{print $NF;}' | gawk -F. 'BEGIN{OFS=".";}{$NF="o";print $0;}' )
 	    for lc in arlib solib; do
 		[[ "${lc}" = "arlib" ]] && libfeat=( -DARLIBRARY=1 )
 		[[ "${lc}" = "solib" ]] && libfeat=( -DSOLIBRARY=1 -DfPIC=1 -fPIC )
 
@@ -1352,11 +1352,11 @@
 	    echo -n " obj/${pgmclass}/${pgmname}/${objname}"
 	done
 	echo ""
 
 	# link, object files, libraries
-	echo -n "${tab}\$(pgm_ld_cmd) \$(pgm_ld_opt) -o ${pgmclass}/${pgmname}"
+	echo -n "${tab}\$(pgm_ld_cmd) \$(CFLAGS) \$(LDFLAGS) \$(pgm_ld_opt) -o ${pgmclass}/${pgmname}"
 	class_product_obj "${pgmclass}" "${pgmname}" | while read objname; do
 	    echo -n " obj/${pgmclass}/${pgmname}/${objname}"
 	done
 	if [[ -z "${nosolib}" && -n "${execdynamic}" ]]; then
 	    echo -n " -L./lib"
@@ -1396,11 +1396,11 @@
 
 	# compile each source file for each object needed by this executable
 	class_product_src "${pgmclass}" "${pgmname}" | while read srcname; do
 	    vmsg 9 "Generating Makefile section: ${pgmclass} ${pgmname} ${srcname}"
 	    srcdir=$( dirname "${srcname}" )
-	    srcref="-I ${srcdir} -I ${source}/include -I- -I ./include ${srcname}"
+ 	    srcref="-iquote ${srcdir} -iquote ${source}/include -I ./include ${srcname}"
 	    objname=$( echo "${srcname}" | gawk -F/ '{print $NF;}' | gawk -F. 'BEGIN{OFS=".";}{$NF="o";print $0;}' )
 	    echo "obj/${pgmclass}/${pgmname}/${objname}: ${srcname}"
 	    if [[ -n "${asm}" ]]; then
 		if [[ -n "${cpp}" ]]; then
 		    cppname=$( echo "${objname}" | gawk -F. 'BEGIN{OFS=".";}{$NF="i";print $0;}' )