From: Philipp Gesang <phg@phi-gamma.net>
To: ConTeXt ML <ntg-context@ntg.nl>
Subject: standalone / setuptex on ARM
Date: Tue, 23 Aug 2016 07:46:57 +0200 [thread overview]
Message-ID: <20160823054653.GA4452@phlegethon> (raw)
[-- Attachment #1.1.1: Type: text/plain, Size: 1574 bytes --]
Hi,
when setting up Context for my phone, I noticed the ARM binaries
that come with the Standalone don’t work because the system is
armv7l soft-float:
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6/lto-wrapper
Target: arm-linux-gnueabi
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-14' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv4t --with-float=soft --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-14)
Since I’m supplying my own Luatex binary that’s no problem per
se, I just had to modify setuptex a bit.
Could we add a couple lines like the attached patch to the
script? I’m under the impression that “armel” is a Debian
specific term so feel free to change it. Though it might be
better in general to use the “arm-linux-gnueabi” and
“arm-linux-gnueabihf” triplets to separate the platforms.
Best,
Philipp
[-- Attachment #1.1.2: 2016-08-23_setuptex-armel.patch --]
[-- Type: text/x-diff, Size: 1104 bytes --]
--- tex/setuptex.orig 2016-08-22 23:51:21.000000000 +0200
+++ tex/setuptex 2016-08-23 07:44:31.000000000 +0200
@@ -33,7 +33,26 @@
# we need more hacks to fix the situation, this is just a temporary solution
mips|mips64|mipsel|mips64el) platform="linux-mipsel" ;;
# TODO: probably both wrong and incomplete
- armv7l) platform="linux-armhf" ;;
+ armv7l)
+ platform="linux-armhf"
+ # machine id output by uname(1) is
+ # insufficent to determine whether this
+ # is a soft or hard float system so we
+ # check ourselves.
+ # a) binutils, this should work almost
+ # everywhere
+ if $(which readelf >/dev/null 2>&1); then
+ readelf -A /proc/self/exe | grep -q '^ \+Tag_ABI_VFP_args'
+ if [ ! $? ]; then
+ platform="linux-armel"
+ fi
+ # b) debian-specific fallback
+ elif $(which dpkg >/dev/null 2>&1); then
+ if [ "$(dpkg --print-architecture)" = armel ]; then
+ platform="linux-armel"
+ fi
+ fi # else go with hard fp
+ ;;
*) platform="unknown" ;;
esac ;;
# Mac OS X
[-- Attachment #1.2: Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2016-08-23 5:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 5:46 Philipp Gesang [this message]
2016-08-23 8:44 ` Hans Hagen
2016-08-23 9:15 ` Mojca Miklavec
2016-08-23 9:27 ` Mojca Miklavec
2016-08-23 10:03 ` Mojca Miklavec
2016-08-23 10:53 ` Mojca Miklavec
2016-08-23 11:30 ` luigi scarso
2016-08-23 17:41 ` Philipp Gesang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160823054653.GA4452@phlegethon \
--to=phg@phi-gamma.net \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).