1 |
Hey list, this probably isnt of much interest to non-alpha users, but i've |
2 |
just committed a new eclass with functions to help make ccc compatability |
3 |
easier, theres a synopsis below. |
4 |
|
5 |
# |
6 |
#### hide-restrict-arr #### |
7 |
# Scan for and replace __restrict_arr with a ccc |
8 |
# supported equivalent. |
9 |
# |
10 |
# you might see an error like this if you need this: |
11 |
# |
12 |
# cc: Error: regexec.c, line 209: In the definition of the function "regexec", |
13 |
# the promoted type of pmatch is incompatible with the type of the corresponding |
14 |
# parameter in a prior declaration. (promotmatch) |
15 |
# regmatch_t pmatch[]; |
16 |
# ---------------^ |
17 |
# |
18 |
#### replace-cc-hardcode #### |
19 |
# Look for common cc hardcodes in Makefiles. |
20 |
# |
21 |
#### replace-cxx-hardcode #### |
22 |
# Look for common cxx hardcodes in Makefiles. |
23 |
# |
24 |
#### is-ccc #### |
25 |
# Returns success if dec compiler is being used. |
26 |
# |
27 |
# example: |
28 |
# |
29 |
# is-ccc && hide-restrict-arr |
30 |
# |
31 |
#### is-cxx #### |
32 |
# Returns success if dec c++ compiler is being used. |
33 |
# |
34 |
#### replace-ccc-g #### |
35 |
# Try to replace -g with -g3 |
36 |
# |
37 |
#### ccc-elf-check </path/to/binary> #### |
38 |
# Return success if binary was compiled with ccc |
39 |
# |
40 |
# example: |
41 |
# if ! is-ccc; then |
42 |
# ccc-elf-check /usr/lib/libglib.a && \ |
43 |
# append-ldflags -lots |
44 |
# fi |
45 |
# |
46 |
# NOTE: i think the binary and shared library detection |
47 |
# is pretty safe, but the archive detection may not |
48 |
# be as reliable. |
49 |
#### create-so </usr/lib/library.a> <library.so> #### |
50 |
# Make the shared library (.so) specified from the archive (.a) |
51 |
# specified. LDFLAGS will be honoured. if you need a different |
52 |
# `soname` (DT_SONAME) from the shared lib filename, you will have |
53 |
# to do it manually ;) |
54 |
# |
55 |
# example: |
56 |
# is-ccc && \ |
57 |
# create-so /usr/lib/libcoolstuff.a libcoolstuff.so.${PV} |
58 |
# dosym /usr/lib/libcoolstuff.so.${PV} /usr/lib/libcoolstuff.so |
59 |
# |
60 |
# NOTE: -lots will be used by default, this is ccc.eclass after all :) |
61 |
# NOTE: .${PV} is optional, of course. |
62 |
# NOTE: dolib.so will manage installation |
63 |
#### append-ldflags <flag> #### |
64 |
#### is-ldflag <flag> #### |
65 |
#### filter-ldflags <flag> #### |
66 |
# flag-o-matic doesnt provide LDFLAGS utilities. |
67 |
# Some replacements for ccc porting. These functions |
68 |
# mimic the flag-o-matic equivalents, look in there for |
69 |
# documentation. |
70 |
# |
71 |
#### |
72 |
# |
73 |
|
74 |
-- |
75 |
------------------------------------- |
76 |
taviso@××××××××××××.org | finger me for my gpg key. |
77 |
------------------------------------------------------- |
78 |
|
79 |
-- |
80 |
gentoo-dev@g.o mailing list |