Tue, 29 Mar 2011 20:04:34 +0200
Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.
The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.
It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.
1 #!@l_prefix@/bin/openpkg rc
2 ##
3 ## rc.mico -- Run-Commands
4 ##
6 %config
7 mico_enable="$openpkg_rc_def"
8 mico_micod="no"
9 mico_nsd="no"
10 mico_ip_micod="127.0.0.1"
11 mico_ip_nsd="127.0.0.1"
12 mico_micod_args="-ORBGIOPVersion 1.2 -ORBIIOPVersion 1.2 -ORBIIOPAddr inet:${mico_ip_micod}:8912"
13 mico_nsd_args="-ORBGIOPVersion 1.2 -ORBIIOPVersion 1.2 -ORBIIOPAddr inet:${mico_ip_nsd}:8914"
15 %common
16 mico_micod_pidfile="@l_prefix@/var/mico/micod.pid"
17 mico_nsd_pidfile="@l_prefix@/var/mico/nsd.pid"
18 mico_signal () {
19 local rc_micod=0
20 local rc_nsd=0
21 if rcVarIsYes mico_micod; then
22 [ -f $mico_micod_pidfile ] \
23 && kill -$1 `cat $mico_micod_pidfile`
24 rc_micod=$?
25 fi
26 if rcVarIsYes mico_nsd; then
27 [ -f $mico_nsd_pidfile ] \
28 && kill -$1 `cat $mico_nsd_pidfile`
29 rc_nsd=$?
30 fi
31 [ $rc_micod -eq 0 -a $rc_nsd -eq 0 ]
32 }
34 %status -u @l_rusr@ -o
35 mico_usable="unknown"
36 mico_active="no"
37 rcService mico enable yes && \
38 ( rcVarIsYes mico_micod || rcVarIsYes mico_nsd ) && \
39 mico_signal 0 && mico_active="yes"
40 echo "mico_enable=\"$mico_enable\""
41 echo "mico_usable=\"$mico_usable\""
42 echo "mico_active=\"$mico_active\""
44 %start -u @l_rusr@
45 rcService mico enable yes || exit 0
46 rcService mico active yes && exit 0
47 # run the object adapter daemon for dynamic object activation
48 if rcVarIsYes mico_micod; then
49 @l_prefix@/bin/micod ${mico_micod_args} &
50 echo $! >$mico_micod_pidfile
51 fi
52 # run the name service daemon for flexible object indexing
53 if rcVarIsYes mico_nsd; then
54 @l_prefix@/bin/nsd ${mico_nsd_args} &
55 echo $! >$mico_nsd_pidfile
56 fi
58 %stop -u @l_rusr@
59 rcService mico enable yes || exit 0
60 rcService mico active no && exit 0
61 mico_signal TERM
62 rm -f $mico_micod_pidfile 2>/dev/null || true
63 rm -f $mico_nsd_pidfile 2>/dev/null || true
65 %restart -u @l_rusr@
66 rcService mico enable yes || exit 0
67 rcService mico active no && exit 0
68 rc mico stop
69 sleep 2
70 rc mico start