Merge lp:~ignacio-nin/percona-server/5.6-bug1133266 into lp:percona-server/5.6

Proposed by Ignacio Nin
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: 379
Merged at revision: 380
Proposed branch: lp:~ignacio-nin/percona-server/5.6-bug1133266
Merge into: lp:percona-server/5.6
Diff against target: 117 lines (+32/-6)
4 files modified
build/build-binary.sh (+11/-3)
build/build-dpkg.sh (+11/-1)
build/build-rpm.sh (+9/-1)
build/percona-server.spec (+1/-1)
To merge this branch: bzr merge lp:~ignacio-nin/percona-server/5.6-bug1133266
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+167637@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build/build-binary.sh'
2--- build/build-binary.sh 2013-05-31 08:06:00 +0000
3+++ build/build-binary.sh 2013-06-05 20:52:38 +0000
4@@ -97,6 +97,14 @@
5 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
6 test -e "$SOURCEDIR/Makefile" || exit 2
7
8+# The number of processors is a good default for -j
9+if test -e "/proc/cpuinfo"
10+then
11+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
12+else
13+ PROCESSORS=4
14+fi
15+
16 # Extract version from the Makefile
17 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
18 | cut -d = -f 2)"
19@@ -116,7 +124,7 @@
20 export CXX=${CXX:-g++}
21 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
22 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CXXFLAGS:-}"
23-export MAKE_JFLAG=-j4
24+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
25
26 # Create a temporary working directory
27 INSTALLDIR="$(cd "$WORKDIR" && TMPDIR="$WORKDIR_ABS" mktemp -d percona-build.XXXXXX)"
28@@ -163,7 +171,7 @@
29 cd "UDF"
30 CXX=${UDF_CXX:-g++} ./configure --includedir="$SOURCEDIR/$PRODUCT/include" \
31 --libdir="/usr/local/$PRODUCT_FULL/mysql/plugin"
32- make
33+ make $MAKE_JFLAG
34 make DESTDIR="$INSTALLDIR" install
35
36 )
37@@ -176,7 +184,7 @@
38
39 ./configure --prefix="/usr/local/$PRODUCT_FULL/" \
40 --libdir="/usr/local/$PRODUCT_FULL/lib/mysql/"
41- make
42+ make $MAKE_JFLAG
43 make DESTDIR="$INSTALLDIR" install_lib_shared
44
45 # Copy COPYING file
46
47=== modified file 'build/build-dpkg.sh'
48--- build/build-dpkg.sh 2013-05-27 03:01:29 +0000
49+++ build/build-dpkg.sh 2013-06-05 20:52:38 +0000
50@@ -69,6 +69,14 @@
51 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
52 test -e "$SOURCEDIR/Makefile" || exit 2
53
54+# The number of processors is a good default for -j
55+if test -e "/proc/cpuinfo"
56+then
57+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
58+else
59+ PROCESSORS=4
60+fi
61+
62 # Extract version from the Makefile
63 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
64 | cut -d = -f 2)"
65@@ -84,9 +92,11 @@
66 # Compilation flags
67 export CC=${CC:-gcc}
68 export CXX=${CXX:-g++}
69+export HS_CXX=${HS_CXX:-g++}
70+export UDF_CXX=${UDF_CXX:-g++}
71 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CFLAGS:-}"
72 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION ${CXXFLAGS:-}"
73-export MAKE_JFLAG=-j4
74+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
75
76 # Prepare sources
77 (
78
79=== modified file 'build/build-rpm.sh'
80--- build/build-rpm.sh 2013-05-31 08:06:00 +0000
81+++ build/build-rpm.sh 2013-06-05 20:52:38 +0000
82@@ -98,6 +98,14 @@
83 SOURCEDIR="$(cd $(dirname "$0"); cd ..; pwd)"
84 test -e "$SOURCEDIR/Makefile" || exit 2
85
86+# The number of processors is a good default for -j
87+if test -e "/proc/cpuinfo"
88+then
89+ PROCESSORS="$(grep -c ^processor /proc/cpuinfo)"
90+else
91+ PROCESSORS=4
92+fi
93+
94 # Extract version from the Makefile
95 MYSQL_VERSION="$(grep ^MYSQL_VERSION= "$SOURCEDIR/Makefile" \
96 | cut -d = -f 2)"
97@@ -117,7 +125,7 @@
98 export UDF_CXX="${UDF_CXX:-g++}"
99 export CFLAGS="-fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CFLAGS:-}"
100 export CXXFLAGS="-O2 -fno-omit-frame-pointer -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -DPERCONA_INNODB_VERSION=$PERCONA_SERVER_VERSION $TARGET_CFLAGS ${CXXFLAGS:-}"
101-export MAKE_JFLAG=-j4
102+export MAKE_JFLAG="${MAKE_JFLAG:--j$PROCESSORS}"
103
104 # Create directories for rpmbuild if these don't exist
105 (cd "$WORKDIR" && mkdir -p BUILD RPMS SOURCES SPECS SRPMS)
106
107=== modified file 'build/percona-server.spec'
108--- build/percona-server.spec 2013-06-03 01:41:20 +0000
109+++ build/percona-server.spec 2013-06-05 20:52:38 +0000
110@@ -348,7 +348,7 @@
111 CXXFLAGS="$CXXFLAGS -I$RPM_BUILD_DIR/%{src_dir}/release/include" \
112 ./configure --includedir=$RPM_BUILD_DIR/%{src_dir}/include \
113 --libdir=%{_libdir}/mysql/plugin
114- make all
115+ make ${MAKE_JFLAG} all
116 cd -
117 }
118

Subscribers

People subscribed via source and target branches