Commit 6cb46fe5 authored by sunny's avatar sunny

branches/zip: Add an additional target architecture parameter to

make_binary_release.sh which is passed to dynconfig. If the target
architecture is i[3456]86 then we disable the --with-pic flag.
parent 448ea971
...@@ -105,21 +105,24 @@ sub squeeze($) { ...@@ -105,21 +105,24 @@ sub squeeze($) {
return(rtrim(ltrim($string))); return(rtrim(ltrim($string)));
} }
if ($#ARGV != 0) { if ($#ARGV != 1) {
die "usage: $0 path/to/mysqlbug\n"; die "usage: $0 target-arch path/to/mysqlbug\n";
} }
open(F, $ARGV[0]) || my $mysqlbug = $ARGV[1];
die "Error opening $ARGV[0]: $!\n"; my $arch = squeeze($ARGV[0]);
open(F, $mysqlbug) ||
die "Error opening $mysqlbug: $!\n";
read(F, $buffer, 131072) || read(F, $buffer, 131072) ||
die "Error reading file $ARGV[0]: $!\n"; die "Error reading file $mysqlbug: $!\n";
close(F); close(F);
my @matched = grep(/^CONFIGURE_LINE=/, split(/\n/, $buffer)); my @matched = grep(/^CONFIGURE_LINE=/, split(/\n/, $buffer));
# Check for no match # Check for no match
if ($#matched == -1 ) { if ($#matched == -1 ) {
die "CONFIGURE_LINE= not found in : $ARGV[0]\n"; die "CONFIGURE_LINE= not found in : $mysqlbug\n";
# Check if more than one line matched # Check if more than one line matched
} elsif ($#matched > 0) { } elsif ($#matched > 0) {
die "Error: $#matched matches for CONFIGURE_LINE= found.\n"; die "Error: $#matched matches for CONFIGURE_LINE= found.\n";
...@@ -137,6 +140,11 @@ foreach my $var (@environment) { ...@@ -137,6 +140,11 @@ foreach my $var (@environment) {
} }
} }
# We don't compile with the PIC flag for i386.
if ($arch =~ /^i[3456]86$/) {
$mapped{"--with-pic"} = "--without-pic";
}
# Set the value to "" for the parameters to be removed. # Set the value to "" for the parameters to be removed.
if (defined($ENV{"MYSQL_CONFIG_DEL"})) { if (defined($ENV{"MYSQL_CONFIG_DEL"})) {
my $value = $ENV{"MYSQL_CONFIG_DEL"}; my $value = $ENV{"MYSQL_CONFIG_DEL"};
......
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
# the tar file. e.g. innodb-5.1-1.0.b1.tar.gz when extracted should # the tar file. e.g. innodb-5.1-1.0.b1.tar.gz when extracted should
# have a top level directory named "innodb-5.1-1.0.b1". # have a top level directory named "innodb-5.1-1.0.b1".
# #
# 4. path to the target mysqlbug file or '-', if the third param is # 4. Target architecture e.g., i386 or amd64
#
# 5. path to the target mysqlbug file or '-', if the third param is
# '-' then all options following it are passed to the configure command. # '-' then all options following it are passed to the configure command.
# #
# Note: The mysqlbug file is normally located in the bin directory where you # Note: The mysqlbug file is normally located in the bin directory where you
...@@ -36,18 +38,20 @@ strlen() ...@@ -36,18 +38,20 @@ strlen()
INNODIR="storage/innobase" INNODIR="storage/innobase"
DYNTMPFILE="/tmp/configure.$$" DYNTMPFILE="/tmp/configure.$$"
DYNCONFIG="$INNODIR/scripts/dynconfig" #DYNCONFIG="$INNODIR/scripts/dynconfig"
DYNCONFIG="$HOME/scripts/dynconfig"
SVN_REPO="https://svn.innodb.com/svn/innodb" SVN_REPO="https://svn.innodb.com/svn/innodb"
SVN_REPO_STRLEN=`strlen $SVN_REPO` SVN_REPO_STRLEN=`strlen $SVN_REPO`
if [ $# -lt 4 ]; then if [ $# -lt 4 ]; then
echo>&2 "Usage: $0 mysql-source-dir build-dir innosrc (/path/to/mysqlbug | - followed by configure options)" echo>&2 "Usage: $0 mysql-source-dir build-dir innosrc target-arch (/path/to/mysqlbug | - followed by configure options)"
exit 1 exit 1
fi fi
SRC=$1; shift SRC=$1; shift
BLD=$1; shift BLD=$1; shift
SVN=$1; shift SVN=$1; shift
ARH=$1; shift
CFL=$1; shift CFL=$1; shift
# These can be overridden with environment variables. # These can be overridden with environment variables.
...@@ -108,7 +112,7 @@ if [ "$CFL" != "-" ]; then ...@@ -108,7 +112,7 @@ if [ "$CFL" != "-" ]; then
trap "{ rm -f $DYNTMPFILE; }" EXIT SIGINT SIGTERM trap "{ rm -f $DYNTMPFILE; }" EXIT SIGINT SIGTERM
# Generate storage/innobase/Makefile and other prerequisites # Generate storage/innobase/Makefile and other prerequisites
$DYNCONFIG $CFL > $DYNTMPFILE $DYNCONFIG $ARH $CFL > $DYNTMPFILE
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "dynconfig failed to get config parameters: $CONFIGURE" echo "dynconfig failed to get config parameters: $CONFIGURE"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment