09-08-2010
It can't compile for different architectures unless you have a version configured to do so. For the 99% of people who don't need them, the code and headers to compile ARM, SPARC, MIPS, and other foreign binaries would be a pointless waste of space. When I tried developing for OpenWRT, their CVS repository installed it's own whole dedicated compiler!
Even if configured for ARM it probably won't be producing binaries quite the way you want them -- compile an ARM executable under linux and you'll get an ARM Linux executable, not one for a foreign OS, because you compiled it with linux headers...
9 More Discussions You Might Find Interesting
1. Solaris
AIM- Install Oracle 11g on Solaris using VMWare
Steps
1.Logged on as root
2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc
3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD
4.Copied files from CD to /usr/local/bin/gcc
5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies
2. Linux
Hi,
Does anybody have a good pointer on Linux kernel internals for ARM architecture? I can locate plenty for x86 but since ARM is RISC I think there would be subtle changes. So if somebody has a knowledge of good document on Linux Kernel internals for ARM or even a comparative study of kernel on... (0 Replies)
Discussion started by: Rakesh Ranjan
0 Replies
3. Programming
Running a multi-threaded program in my arm board one day or more ,The process down .
In order to get a coredump to analysis of the stack , . I use commands ulimited -c unlimited .
but when the process down . no coredump
But I write a test
#include <stdio.h>
int main(void){
... (14 Replies)
Discussion started by: aobai
14 Replies
4. UNIX for Advanced & Expert Users
I want to find the ARM assembly language for my sample C code using gcc .I had gcc compiler ,whether it is enough for it or i need to download gcc arm cross compiler.If necessary ,how it configured?I am using fedora (0 Replies)
Discussion started by: sujith4u87
0 Replies
5. Fedora
think only compile is required I wish to compile a sample code
int main()
{
int a=5,b=8,c;
c=a+b;
}
compile using gcc -Wall -g -march=arm922t main.c -o hello
I got an error
:bad value(arm922t) for -march=switch
instead of using march i used mcpu options ,the same... (1 Reply)
Discussion started by: sujith4u87
1 Replies
6. Programming
Hello all, I have just installed cygwin and arm tools to do some arm assembly programming, but when i try to initialize insight with arm-elf-insight xxx.xxx I receive the message that arm-elf-insight cannot find cygncurses-8.dll. In my lib directory I have cygncurses-10.dll, but not... (0 Replies)
Discussion started by: Hiox
0 Replies
7. Programming
I created and Compiled a C program to run in QEMU for ARM.
When I run the program using the command
#qemu-arm -L /home/arm-2010.09/arm-none-linux-gnueabi/libc ./test
it gives me the following error:
If 'qemu-arm' is not a typo you can use command-not-found to lookup the package that contains... (0 Replies)
Discussion started by: rupeshkp728
0 Replies
8. Programming
Hello everyone. I am running Debian on an ARM7 Device (aka my android phone). Everything is great. Works well.
I would love to use it for Development.
Mainly my interests are in Web Development, and Java development.
So far the only useful IDE for debian arm is Netbeans. Which is pretty... (0 Replies)
Discussion started by: CDevelop
0 Replies
9. BSD
Hey all
I've been thinking of switching my x86 Solaris out with ARM 64 Bit and FreeBSD.
Now i know i can migrate my striped-mirror ZFS to FreeBSD.
So to get to the point.
I take advantage of Kernel Zones on Solaris (Routing, Firewall, Web Access and Web Page etc.) and from time to time need... (1 Reply)
Discussion started by: Reclzz
1 Replies
SETARCH(8) System Administration SETARCH(8)
NAME
setarch - change reported architecture in new program environment and set personality flags
SYNOPSIS
setarch arch [options] [program [argument...]]
arch [options] [program [argument...]]
setarch --list|-h|-V
DESCRIPTION
setarch currently only affects the output of uname -m. For example, on an AMD64 system, running setarch i386 program will cause program to
see i686 instead of x86_64 as the machine type. It also allows to set various personality options. The default program is /bin/sh.
OPTIONS
--list List the architectures that setarch knows about. Whether setarch can actually set each of these architectures depends on the run-
ning kernel.
--uname-2.6
Causes the program to see a kernel version number beginning with 2.6. Turns on UNAME26.
-v, --verbose
Be verbose.
-3, --3gb
Specifies program should use a maximum of 3GB of address space. Supported on x86. Turns on ADDR_LIMIT_3GB.
--4gb This option has no effect. It is retained for backward compatibility only, and may be removed in future releases.
-B, --32bit
Limit the address space to 32 bits to emulate hardware. Supported on ARM and Alpha. Turns on ADDR_LIMIT_32BIT.
-F, --fdpic-funcptrs
Treat user-space function pointers to signal handlers as pointers to address descriptors. This option has no effect on architec-
tures that do not support FDPIC ELF binaries. In kernel v4.14 support is limited to ARM, Blackfin, Fujitsu FR-V, and SuperH CPU
architectures.
-I, --short-inode
Obsolete bug emulation flag. Turns on SHORT_INODE.
-L, --addr-compat-layout
Provide legacy virtual address space layout. Use when the program binary does not have PT_GNU_STACK ELF header. Turns on ADDR_COM-
PAT_LAYOUT.
-R, --addr-no-randomize
Disables randomization of the virtual address space. Turns on ADDR_NO_RANDOMIZE.
-S, --whole-seconds
Obsolete bug emulation flag. Turns on WHOLE_SECONDS.
-T, --sticky-timeouts
This makes select(2), pselect(2), and ppoll(2) system calls preserve the timeout value instead of modifying it to reflect the amount
of time not slept when interrupted by a signal handler. Use when program depends on this behavior. For more details see the time-
out description in select(2) manual page. Turns on STICKY_TIMEOUTS.
-X, --read-implies-exec
If this is set then mmap(3) PROT_READ will also add the PROT_EXEC bit - as expected by legacy x86 binaries. Notice that the ELF
loader will automatically set this bit when it encounters a legacy binary. Turns on READ_IMPLIES_EXEC.
-Z, --mmap-page-zero
SVr4 bug emulation that will set mmap(3) page zero as read-only. Use when program depends on this behavior, and the source code is
not available to be fixed. Turns on MMAP_PAGE_ZERO.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
EXAMPLES
setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm
AUTHOR
Elliot Lee <sopwith@redhat.com>
Jindrich Novy <jnovy@redhat.com>
SEE ALSO
personality(2), select(2)
AVAILABILITY
The setarch command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils
/util-linux/>.
util-linux December 2017 SETARCH(8)