[PATCH] Version info mixes up host and target platform when cross-compiling
I tried running PostgreSQL on the ARM64 (aka AArch64) emulator and
noticed that the version() string mixes up the host and target
architecture.
Before:
PostgreSQL 9.3devel on x86_64-pc-linux-gnu, compiled by
aarch64-linux-gnu-gcc-4.7 (Ubuntu/Linaro 4.7.2-21ubuntu3) 4.7.2, 64-bit
Now:
PostgreSQL 9.3devel on aarch64-linux-gnu-gcc-4.7 (Ubuntu/Linaro
4.7.2-21ubuntu3) 4.7.2, compiled by x86_64-pc-linux-gnu, 64-bit
In other news, I can confirm that PostgreSQL git HEAD works and passes
all tests on AArch64 on Ubuntu Raring. The tests took 52 minutes to
run in the emulator, but I got there. :)
Obviously native spinlock code is still missing. There are no shipping
processors yet so we have some time.
Regards,
Marti
Attachments:
0001-Version-info-mixes-up-host-and-target-platform-when-.patchapplication/octet-stream; name=0001-Version-info-mixes-up-host-and-target-platform-when-.patchDownload
From a0700aa3864e832cf27b00243e1366069085d13b Mon Sep 17 00:00:00 2001
From: Marti Raudsepp <marti@juffo.org>
Date: Sat, 16 Mar 2013 14:55:45 +0200
Subject: [PATCH] Version info mixes up host and target platform when
cross-compiling
Before:
PostgreSQL 9.3devel on x86_64-pc-linux-gnu, compiled by
aarch64-linux-gnu-gcc-4.7 (Ubuntu/Linaro 4.7.2-21ubuntu3) 4.7.2, 64-bit
Now:
PostgreSQL 9.3devel on aarch64-linux-gnu-gcc-4.7 (Ubuntu/Linaro
4.7.2-21ubuntu3) 4.7.2, compiled by x86_64-pc-linux-gnu, 64-bit
---
configure | 2 +-
configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 9efd866..6e0b723 100755
--- a/configure
+++ b/configure
@@ -30196,7 +30196,7 @@ fi
cat >>confdefs.h <<_ACEOF
-#define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"
+#define PG_VERSION_STR "PostgreSQL $PACKAGE_VERSION on $cc_string, compiled by $host, `expr $ac_cv_sizeof_void_p \* 8`-bit"
_ACEOF
diff --git a/configure.in b/configure.in
index f31f7ef..f5d60f9 100644
--- a/configure.in
+++ b/configure.in
@@ -1902,7 +1902,7 @@ else
fi
AC_DEFINE_UNQUOTED(PG_VERSION_STR,
- ["PostgreSQL $PACKAGE_VERSION on $host, compiled by $cc_string, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
+ ["PostgreSQL $PACKAGE_VERSION on $cc_string, compiled by $host, `expr $ac_cv_sizeof_void_p \* 8`-bit"],
[A string containing the version number, platform, and C compiler])
# Supply a numeric version string for use by 3rd party add-ons
--
1.8.2
On Sun, Mar 17, 2013 at 3:17 PM, Marti Raudsepp <marti@juffo.org> wrote:
Now:
PostgreSQL 9.3devel on aarch64-linux-gnu-gcc-4.7 (Ubuntu/Linaro
4.7.2-21ubuntu3) 4.7.2, compiled by x86_64-pc-linux-gnu, 64-bit
Sorry, that is clearly wrong. I'll come up with a better patch soon
(and actually check that it makes sense! :)
Regards,
Marti
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
On Sun, Mar 17, 2013 at 3:38 PM, Marti Raudsepp <marti@juffo.org> wrote:
Sorry, that is clearly wrong. I'll come up with a better patch soon
(and actually check that it makes sense! :)
Sorry about the noise, I just misunderstood the configure --target and
--host arguments. If I set them correctly then the version string ends
up right, too.
Marti
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers