mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 22:34:18 +01:00
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.
This commit is contained in:
parent
8bbb6142d9
commit
4ab3c46b3f
2 changed files with 22 additions and 10 deletions
|
@ -105,21 +105,24 @@ sub squeeze($) {
|
|||
return(rtrim(ltrim($string)));
|
||||
}
|
||||
|
||||
if ($#ARGV != 0) {
|
||||
die "usage: $0 path/to/mysqlbug\n";
|
||||
if ($#ARGV != 1) {
|
||||
die "usage: $0 target-arch path/to/mysqlbug\n";
|
||||
}
|
||||
|
||||
open(F, $ARGV[0]) ||
|
||||
die "Error opening $ARGV[0]: $!\n";
|
||||
my $mysqlbug = $ARGV[1];
|
||||
my $arch = squeeze($ARGV[0]);
|
||||
|
||||
open(F, $mysqlbug) ||
|
||||
die "Error opening $mysqlbug: $!\n";
|
||||
read(F, $buffer, 131072) ||
|
||||
die "Error reading file $ARGV[0]: $!\n";
|
||||
die "Error reading file $mysqlbug: $!\n";
|
||||
close(F);
|
||||
|
||||
my @matched = grep(/^CONFIGURE_LINE=/, split(/\n/, $buffer));
|
||||
|
||||
# Check for no match
|
||||
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
|
||||
} elsif ($#matched > 0) {
|
||||
die "Error: $#matched matches for CONFIGURE_LINE= found.\n";
|
||||
|
@ -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.
|
||||
if (defined($ENV{"MYSQL_CONFIG_DEL"})) {
|
||||
my $value = $ENV{"MYSQL_CONFIG_DEL"};
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
# 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".
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
# Note: The mysqlbug file is normally located in the bin directory where you
|
||||
|
@ -36,18 +38,20 @@ strlen()
|
|||
|
||||
INNODIR="storage/innobase"
|
||||
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_STRLEN=`strlen $SVN_REPO`
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
SRC=$1; shift
|
||||
BLD=$1; shift
|
||||
SVN=$1; shift
|
||||
ARH=$1; shift
|
||||
CFL=$1; shift
|
||||
|
||||
# These can be overridden with environment variables.
|
||||
|
@ -108,7 +112,7 @@ if [ "$CFL" != "-" ]; then
|
|||
trap "{ rm -f $DYNTMPFILE; }" EXIT SIGINT SIGTERM
|
||||
|
||||
# Generate storage/innobase/Makefile and other prerequisites
|
||||
$DYNCONFIG $CFL > $DYNTMPFILE
|
||||
$DYNCONFIG $ARH $CFL > $DYNTMPFILE
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "dynconfig failed to get config parameters: $CONFIGURE"
|
||||
|
|
Loading…
Add table
Reference in a new issue