Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 258153
Collapse All | Expand All

(-)ccc.eclass (-10 / +10 lines)
Lines 70-76 Link Here
70
	#           regmatch_t __pmatch[__restrict_arr]
70
	#           regmatch_t __pmatch[__restrict_arr]
71
	#
71
	#
72
72
73
	find ${WORKDIR} -iname '*.h' | \
73
	find "${WORKDIR}" -iname '*.h' | \
74
		xargs | ccc-fixup 's#\(\[__restrict\)_arr\]#\1\]#g'
74
		xargs | ccc-fixup 's#\(\[__restrict\)_arr\]#\1\]#g'
75
}
75
}
76
76
Lines 82-88 Link Here
82
	# lots of developers hardcode gcc into their
82
	# lots of developers hardcode gcc into their
83
	# Makefiles. Try and fix these.
83
	# Makefiles. Try and fix these.
84
	#
84
	#
85
	find ${WORKDIR} -iname Makefile | \
85
	find "${WORKDIR}" -iname Makefile | \
86
		xargs | ccc-fixup "s#^\(CC.*=\).*g\?cc#\1${CC:-gcc}#g"
86
		xargs | ccc-fixup "s#^\(CC.*=\).*g\?cc#\1${CC:-gcc}#g"
87
}
87
}
88
88
Lines 93-99 Link Here
93
{
93
{
94
	# lots of developers hardcode g++ into thier
94
	# lots of developers hardcode g++ into thier
95
	# Makefiles. Try and fix these.
95
	# Makefiles. Try and fix these.
96
	find ${WORKDIR} -iname Makefile | \
96
	find "${WORKDIR}" -iname Makefile | \
97
		xargs | ccc-fixup "s#^\(CXX.*=\).*[gc]\{1\}++#\1${CXX:-g++}#g"
97
		xargs | ccc-fixup "s#^\(CXX.*=\).*[gc]\{1\}++#\1${CXX:-g++}#g"
98
}
98
}
99
99
Lines 124-130 Link Here
124
{
124
{
125
	# -g will stop ccc/cxx performing optimisation
125
	# -g will stop ccc/cxx performing optimisation
126
	# replacing it with -g3 will let them co-exist.
126
	# replacing it with -g3 will let them co-exist.
127
	find ${WORKDIR} -iname Makefile | \
127
	find "${WORKDIR}" -iname Makefile | \
128
		xargs | ccc-fixup \
128
		xargs | ccc-fixup \
129
		"s#\(^\CX\{,2\}FLAGS[[:space:]]*=.*[\'\"\x20\t]*\)-g\([\'\"\x20\t]\|$\)#\1-g3\2#g"
129
		"s#\(^\CX\{,2\}FLAGS[[:space:]]*=.*[\'\"\x20\t]*\)-g\([\'\"\x20\t]\|$\)#\1-g3\2#g"
130
	# FIXME: my eyes! it burns!
130
	# FIXME: my eyes! it burns!
Lines 197-212 Link Here
197
	# create one by default
197
	# create one by default
198
	if [[ "${2}" == *.so ]]; then
198
	if [[ "${2}" == *.so ]]; then
199
	# no version suffix.
199
	# no version suffix.
200
		${LD:-ld} -shared -o ${T}/${2##*/} -soname ${2##*/} \
200
		${LD:-ld} -shared -o "${T}"/${2##*/} -soname ${2##*/} \
201
			-whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
201
			-whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
202
	else
202
	else
203
	# version suffix
203
	# version suffix
204
		local so_version=${2##*.so}
204
		local so_version=${2##*.so}
205
		${LD:-ld} -shared -o ${T}/${2##*/} -soname `basename ${2/${so_version}}` \
205
		${LD:-ld} -shared -o "${T}"/${2##*/} -soname `basename ${2/${so_version}}` \
206
				-whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
206
				-whole-archive ${1} -no-whole-archive -lots ${LDFLAGS}
207
	fi
207
	fi
208
	# hand installation over to dolib.so
208
	# hand installation over to dolib.so
209
	dolib.so ${T}/${2##*/}
209
	dolib.so "${T}"/${2##*/}
210
}
210
}
211
211
212
# @FUNCTION: append-ldflags
212
# @FUNCTION: append-ldflags
Lines 284-291 Link Here
284
	if [ "${1##*.}" == "a" ] && [ -f "${1}" ]; then
284
	if [ "${1##*.}" == "a" ] && [ -f "${1}" ]; then
285
		einfo "otsifying `basename ${1}` ..."
285
		einfo "otsifying `basename ${1}` ..."
286
286
287
		mkdir ${T}/ccc-otsify-${$}
287
		mkdir "${T}"/ccc-otsify-${$}
288
		cd ${T}/ccc-otsify-${$}
288
		cd "${T}"/ccc-otsify-${$}
289
289
290
		einfo "	extracting archive members from libots ..."
290
		einfo "	extracting archive members from libots ..."
291
		ar ${ar_args}x /usr/lib/libots.a || {
291
		ar ${ar_args}x /usr/lib/libots.a || {
Lines 294-300 Link Here
294
		}
294
		}
295
295
296
		einfo "	appending libots members to `basename ${1}` ..."
296
		einfo "	appending libots members to `basename ${1}` ..."
297
		ar ${ar_args}q ${1} ${T}/ccc-otsify-${$}/*.o || {
297
		ar ${ar_args}q ${1} "${T}"/ccc-otsify-${$}/*.o || {
298
			eerror "	failed to append libots members to ${1}."
298
			eerror "	failed to append libots members to ${1}."
299
			return 1
299
			return 1
300
		}
300
		}

Return to bug 258153