Merge lp:~qu1j0t3/maria/solaris10-port into lp:~maria-captains/maria/5.1-converting

Proposed by Toby Thain
Status: Rejected
Rejected by: Sergei Golubchik
Proposed branch: lp:~qu1j0t3/maria/solaris10-port
Merge into: lp:~maria-captains/maria/5.1-converting
Diff against target: None lines
To merge this branch: bzr merge lp:~qu1j0t3/maria/solaris10-port
Reviewer Review Type Date Requested Status
Kristian Nielsen Pending
Review via email: mp+6999@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Toby Thain (qu1j0t3) wrote :

Added build scripts for 32 bit x86 architecture on Solaris. Renamed some scripts for consistency. Changed to dynamic linking of libgcc.

Revision history for this message
Kristian Nielsen (knielsen) wrote :

Toby Thain <email address hidden> writes:

> Toby Thain has proposed merging lp:~qu1j0t3/maria/solaris10-port into lp:maria.

> Added build scripts for 32 bit x86 architecture on Solaris. Renamed some scripts for consistency. Changed to dynamic linking of libgcc.
> --
> https://code.launchpad.net/~qu1j0t3/maria/solaris10-port/+merge/6999
> You are requested to review the proposed merge of lp:~qu1j0t3/maria/solaris10-port into lp:maria.
>
> === modified file 'BUILD/compile-solaris-amd64'
> --- BUILD/compile-solaris-amd64 2009-05-09 04:01:53 +0000
> +++ BUILD/compile-solaris-amd64 2009-06-02 22:10:57 +0000
> @@ -26,7 +26,7 @@
> extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64"
> extra_configs="$amd64_configs $max_configs --with-libevent"
>
> -LDFLAGS="-lmtmalloc -static-libgcc"
> +LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64"
> export LDFLAGS
>
> . "$path/FINISH.sh"
>

I'm basically ok with these changes.

However, I would like you to add some explaining comments in the commit
message about why the changes are done, especially the above regarding
-static-libgcc and -R/usr/sfw/lib. Why are the changes needed, and what do
they do?

(generally it is more important in comments to explain _why_ than to explain
_what_; the code already shows what happens, but not why.)

Eg. if I had to merge these changes against conflicting changes from MySQL
upstream, I would have no clue about what to do to resolve the conflict.

You might also want to add some comments in the new script files for the Forte
C options if any of them are of special importance, it is up to you really,
you are the one who knows what they mean.

 - Kristian.

Revision history for this message
Toby Thain (qu1j0t3) wrote :
Download full text (3.6 KiB)

On 3-Jun-09, at 12:48 PM, Kristian Nielsen wrote:

> Toby Thain <email address hidden> writes:
>
>> Toby Thain has proposed merging lp:~qu1j0t3/maria/solaris10-port
>> into lp:maria.
>
>> Added build scripts for 32 bit x86 architecture on Solaris.
>> Renamed some scripts for consistency. Changed to dynamic linking
>> of libgcc.
>> --
>> https://code.launchpad.net/~qu1j0t3/maria/solaris10-port/+merge/6999
>> You are requested to review the proposed merge of lp:~qu1j0t3/
>> maria/solaris10-port into lp:maria.
>>
>> === modified file 'BUILD/compile-solaris-amd64'
>> --- BUILD/compile-solaris-amd64 2009-05-09 04:01:53 +0000
>> +++ BUILD/compile-solaris-amd64 2009-06-02 22:10:57 +0000
>> @@ -26,7 +26,7 @@
>> extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64"
>> extra_configs="$amd64_configs $max_configs --with-libevent"
>>
>> -LDFLAGS="-lmtmalloc -static-libgcc"
>> +LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64"
>> export LDFLAGS
>>
>> . "$path/FINISH.sh"
>>
>
> I'm basically ok with these changes.
>
> However, I would like you to add some explaining comments in the
> commit
> message about why the changes are done, especially the above regarding
> -static-libgcc and -R/usr/sfw/lib. Why are the changes needed, and
> what do
> they do?

The -static-libgcc was a legacy of the original build scripts. -R
(analogous to -L link time search path) is a Solaris mechanism to
ensure a needed lib directory is searched at runtime.

Background: Historically gcc has been available on Solaris through
3rd-party ports. In Solaris 10, gcc comes bundled, under /usr/sfw. If
you use a 3rd party gcc then you cannot, of course, rely on the
runtime library being available on all systems where the binaries
might be running; which is perhaps why the old scripts linked libgcc
in this way. But this doesn't apply if you are using the Solaris gcc,
which is what I would recommend as a default procedure. (If a
particular site wants to use source builds and 3rd party gcc then
presumably the necessary libraries have been made available.)

Personally I prefer to see this system library dynamically linked.
One reason is that the application benefits from ordinary system
patch maintenance.

>
> (generally it is more important in comments to explain _why_ than
> to explain
> _what_; the code already shows what happens, but not why.)
>
> Eg. if I had to merge these changes against conflicting changes
> from MySQL
> upstream, I would have no clue about what to do to resolve the
> conflict.
>
> You might also want to add some comments in the new script files
> for the Forte
> C options if any of them are of special importance, it is up to you
> really,
> you are the one who knows what they mean.

These are cribbed from other Solaris builders who have benchmarked
some benefit. I don't have my own benchmarks to justify them, but
this should be done at some point (any recommended procedures?
mysqlslap?)

I guess we have 3 "less arbitrary" choices:
1. follow what Sun/MySQL use as best practice
2. build generically - without any platform performance options, until:
3. recommended options can be developed for Maria based on benchmarking...

Read more...

Revision history for this message
Sergei Golubchik (sergii) wrote :

proposal for the old lp:~maria-captains/maria/5.1-converting tree.
it the proposal is still relevant, please resubmit for the current tree

Unmerged revisions

2708. By Toby Thain

Dynamically link to Solaris' libgcc. Add scripts for 32-bit builds.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'BUILD/compile-solaris-amd64'
--- BUILD/compile-solaris-amd64 2009-05-09 04:01:53 +0000
+++ BUILD/compile-solaris-amd64 2009-06-02 22:10:57 +0000
@@ -26,7 +26,7 @@
26extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64"26extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64"
27extra_configs="$amd64_configs $max_configs --with-libevent"27extra_configs="$amd64_configs $max_configs --with-libevent"
2828
29LDFLAGS="-lmtmalloc -static-libgcc"29LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64"
30export LDFLAGS30export LDFLAGS
3131
32. "$path/FINISH.sh"32. "$path/FINISH.sh"
3333
=== modified file 'BUILD/compile-solaris-amd64-debug'
--- BUILD/compile-solaris-amd64-debug 2009-05-09 04:01:53 +0000
+++ BUILD/compile-solaris-amd64-debug 2009-06-02 22:10:57 +0000
@@ -5,7 +5,7 @@
5extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64 $debug_cflags"5extra_flags="$amd64_cflags -D__sun -m64 -mtune=athlon64 $debug_cflags"
6extra_configs="$amd64_configs $debug_configs $max_configs --with-libevent"6extra_configs="$amd64_configs $debug_configs $max_configs --with-libevent"
77
8LDFLAGS="-lmtmalloc -static-libgcc"8LDFLAGS="-lmtmalloc -R/usr/sfw/lib/64"
9export LDFLAGS9export LDFLAGS
1010
11. "$path/FINISH.sh"11. "$path/FINISH.sh"
1212
=== added file 'BUILD/compile-solaris-amd64-debug-forte'
--- BUILD/compile-solaris-amd64-debug-forte 1970-01-01 00:00:00 +0000
+++ BUILD/compile-solaris-amd64-debug-forte 2009-06-02 22:10:57 +0000
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5
6# Take only #define options - the others are gcc specific.
7# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags)
8DEFS=""
9for F in $debug_cflags ; do
10 expr "$F" : "^-D" && DEFS="$DEFS $F"
11done
12debug_cflags="-O0 -g $DEFS"
13
14extra_flags="-m64 -mt -D_FORTEC_ -xlibmopt -fns=no $debug_cflags"
15extra_configs="$max_configs --with-libevent $debug_configs"
16
17warnings=""
18c_warnings=""
19cxx_warnings=""
20base_cxxflags="-noex"
21
22CC=cc
23CFLAGS="-xstrconst"
24CXX=CC
25LDFLAGS="-lmtmalloc"
26
27. "$path/FINISH.sh"
028
=== removed file 'BUILD/compile-solaris-amd64-forte-debug'
--- BUILD/compile-solaris-amd64-forte-debug 2009-05-09 04:01:53 +0000
+++ BUILD/compile-solaris-amd64-forte-debug 1970-01-01 00:00:00 +0000
@@ -1,27 +0,0 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5
6# Take only #define options - the others are gcc specific.
7# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags)
8DEFS=""
9for F in $debug_cflags ; do
10 expr "$F" : "^-D" && DEFS="$DEFS $F"
11done
12debug_cflags="-O0 -g $DEFS"
13
14extra_flags="-m64 -mt -D_FORTEC_ -xlibmopt -fns=no $debug_cflags"
15extra_configs="$max_configs --with-libevent $debug_configs"
16
17warnings=""
18c_warnings=""
19cxx_warnings=""
20base_cxxflags="-noex"
21
22CC=cc
23CFLAGS="-xstrconst"
24CXX=CC
25LDFLAGS="-lmtmalloc"
26
27. "$path/FINISH.sh"
280
=== added file 'BUILD/compile-solaris-x86-32'
--- BUILD/compile-solaris-x86-32 1970-01-01 00:00:00 +0000
+++ BUILD/compile-solaris-x86-32 2009-06-02 22:10:57 +0000
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5extra_flags="-D__sun -m32"
6extra_configs="$max_configs --with-libevent"
7
8LDFLAGS="-lmtmalloc -R/usr/sfw/lib"
9export LDFLAGS
10
11. "$path/FINISH.sh"
012
=== added file 'BUILD/compile-solaris-x86-32-debug'
--- BUILD/compile-solaris-x86-32-debug 1970-01-01 00:00:00 +0000
+++ BUILD/compile-solaris-x86-32-debug 2009-06-02 22:10:57 +0000
@@ -0,0 +1,11 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5extra_flags="-D__sun -m32 $debug_cflags"
6extra_configs="$max_configs --with-libevent $debug_configs"
7
8LDFLAGS="-lmtmalloc -R/usr/sfw/lib"
9export LDFLAGS
10
11. "$path/FINISH.sh"
012
=== added file 'BUILD/compile-solaris-x86-32-debug-forte'
--- BUILD/compile-solaris-x86-32-debug-forte 1970-01-01 00:00:00 +0000
+++ BUILD/compile-solaris-x86-32-debug-forte 2009-06-02 22:10:57 +0000
@@ -0,0 +1,27 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5
6# Take only #define options - the others are gcc specific.
7# (real fix is for SETUP.sh not to put gcc specific options in $debug_cflags)
8DEFS=""
9for F in $debug_cflags ; do
10 expr "$F" : "^-D" && DEFS="$DEFS $F"
11done
12debug_cflags="-O0 -g $DEFS"
13
14extra_flags="-m32 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3 $debug_cflags"
15extra_configs="$max_configs --with-libevent $debug_configs"
16
17warnings=""
18c_warnings=""
19cxx_warnings=""
20base_cxxflags="-noex"
21
22CC=cc
23CFLAGS="-xstrconst"
24CXX=CC
25LDFLAGS="-lmtmalloc"
26
27. "$path/FINISH.sh"
028
=== added file 'BUILD/compile-solaris-x86-forte-32'
--- BUILD/compile-solaris-x86-forte-32 1970-01-01 00:00:00 +0000
+++ BUILD/compile-solaris-x86-forte-32 2009-06-02 22:10:57 +0000
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3path=`dirname $0`
4. "$path/SETUP.sh"
5
6extra_flags="-m32 -mt -D_FORTEC_ -xbuiltin=%all -xlibmil -xlibmopt -fns=no -xprefetch=auto -xprefetch_level=3"
7extra_configs="$max_configs --with-libevent"
8
9warnings=""
10c_warnings=""
11cxx_warnings=""
12base_cxxflags="-noex"
13
14CC=cc
15CFLAGS="-xstrconst"
16CXX=CC
17LDFLAGS="-lmtmalloc"
18
19. "$path/FINISH.sh"

Subscribers

People subscribed via source and target branches