new eclass: ccc

Tavis Ormandy <[email protected]>
Newsgroups gmane.linux.gentoo.devel,gmane.linux.gentoo.alpha
Message-ID <[email protected]>
Hey list, this probably isnt of much interest to non-alpha users, but i've 
just committed a new eclass with functions to help make ccc compatability 
easier, theres a synopsis below.

#
#### hide-restrict-arr ####
# Scan for and replace __restrict_arr with a ccc
# supported equivalent.
#
# you might see an error like this if you need this:
# 
# cc: Error: regexec.c, line 209: In the definition of the function "regexec", 
# the promoted type of pmatch is incompatible with the type of the corresponding 
# parameter in a prior declaration. (promotmatch)
#     regmatch_t pmatch[];
#     ---------------^
#
#### replace-cc-hardcode ####
# Look for common cc hardcodes in Makefiles.
#
#### replace-cxx-hardcode ####
# Look for common cxx hardcodes in Makefiles.
#
#### is-ccc ####
# Returns success if dec compiler is being used.
#
# example:
#
# is-ccc && hide-restrict-arr
# 
#### is-cxx ####
# Returns success if dec c++ compiler is being used.
#
#### replace-ccc-g ####
# Try to replace -g with -g3 
#
#### ccc-elf-check </path/to/binary> ####
# Return success if binary was compiled with ccc
#
# example:
# if ! is-ccc; then
# ccc-elf-check /usr/lib/libglib.a && \
# append-ldflags -lots
# fi
#
# NOTE: i think the binary and shared library detection
# is pretty safe, but the archive detection may not
# be as reliable.
#### create-so </usr/lib/library.a> <library.so> ####
# Make the shared library (.so) specified from the archive (.a) 
# specified. LDFLAGS will be honoured. if you need a different 
# `soname` (DT_SONAME) from the shared lib filename, you will have 
# to do it manually ;)
#
# example:
# is-ccc && \
# create-so /usr/lib/libcoolstuff.a libcoolstuff.so.${PV}
# dosym /usr/lib/libcoolstuff.so.${PV} /usr/lib/libcoolstuff.so
#
# NOTE: -lots will be used by default, this is ccc.eclass after all :)
# NOTE: .${PV} is optional, of course.
# NOTE: dolib.so will manage installation
#### append-ldflags <flag> ####
#### is-ldflag <flag> ####
#### filter-ldflags <flag> ####
# flag-o-matic doesnt provide LDFLAGS utilities.
# Some replacements for ccc porting. These functions
# mimic the flag-o-matic equivalents, look in there for
# documentation.
#
####
#

-- 
-------------------------------------
[email protected] | finger me for my gpg key.
-------------------------------------------------------

--
[email protected] mailing list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.