473,586 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

-fno-strict-aliasing turned off when cross compiling

Does anyone have an idea why -fno-strict-aliasing is turned off when
cross compiling?

in configure generated for 2.4.4:

case $GCC in
yes)
# Python violates C99 rules, by casting between incompatible
# pointer types. GCC may generate bad code as a result of that,
# so use -fno-strict-aliasing if supported.
echo "$as_me:$LINENO : checking whether $CC accepts -fno-strict-
aliasing" >&5
echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing...
$ECHO_C" >&6
ac_save_cc="$CC "
CC="$CC -fno-strict-aliasing"
if test "$cross_compili ng" = yes; then
ac_cv_no_strict _aliasing_ok=no
^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^ why?

else
Jan 16 '08 #1
3 2905
Does anyone have an idea why -fno-strict-aliasing is turned off when
cross compiling?
Because detection of -fno-strict-aliasing is made through running
the compiler output (AC_TRY_RUN, see configure.in instead). For
cross-compilation, running the program isn't actually possible,
so a default must be specified. Since we can't know whether the
cross-compiler accepts -fno-strict-aliasing, we leave it out.

Regards,
Martin
Jan 17 '08 #2
On Jan 16, 10:56 pm, "Martin v. Löwis" <mar...@v.loewi s.dewrote:
Does anyone have an idea why -fno-strict-aliasing is turned off when
cross compiling?

Because detection of -fno-strict-aliasing is made through running
the compiler output (AC_TRY_RUN, see configure.in instead). For
cross-compilation, running the program isn't actually possible,
so a default must be specified. Since we can't know whether the
cross-compiler accepts -fno-strict-aliasing, we leave it out.
This makes some sense. Thank you. As for this:

def detect_modules( self):
# Ensure that /usr/local is always used
add_dir_to_list (self.compiler. library_dirs, '/usr/local/lib')
add_dir_to_list (self.compiler. include_dirs, '/usr/local/
include')

it looks like a recipe for a disaster when cross compiling:
cc1: warning: include location "/usr/local/include" is unsafe for
cross-compilation
Jan 17 '08 #3
This makes some sense. Thank you. As for this:
>
def detect_modules( self):
# Ensure that /usr/local is always used
add_dir_to_list (self.compiler. library_dirs, '/usr/local/lib')
add_dir_to_list (self.compiler. include_dirs, '/usr/local/
include')

it looks like a recipe for a disaster when cross compiling:
cc1: warning: include location "/usr/local/include" is unsafe for
cross-compilation
Yes, Python doesn't really support cross-compilation. So you are
on your own.

Of course, in true cross-compilation, you won't get a chance to run
setup.py, since python will only run on the target system, not on
the host system, therefore setup.py won't even start, and it doesn't
matter that it won't support cross-compilation.

Regards,
Martin
Jan 17 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1432
by: Jeremy Schoenhaar | last post by:
Only a question. I use Linux, and wont let Windows anywere near my harddrive. Is it possible to compile a win32 binary from linux??? Jeremy
1
975
by: nagesh | last post by:
hi guys, when we compiling the asp.net project, all codebehind pages gives you one dll. suppose if i write the code in .aspx forms itself then is it create a dll ? if i write the code in aspx files then wht is going on when running the project?
0
1485
by: CptDondo | last post by:
I hope someone can help me out. I am trying to cross-compile xcache <http://trac.lighttpd.net/xcache/> and I'm not having much luck. The problem is that xcache depends on phpize to build the configure script. My setup is as follows: ../src/php-4.4.2
1
1629
by: Han-Wen Nienhuys | last post by:
Hello, I have a small patch for Python SVN that makes it possible to cross-compile python on Unix to various other Unix targets. I have successfully built a binary for FreeBSD on Linux. The patch is available at https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1597850&group_id=5470
3
2053
by: Randy Yates | last post by:
Hi Folks, I have a cross-development problem in which I'm using the x86_64 version of Fedora Core 6 as a development system but want to build executables that are 32-bit. I've got a mix of C (mainly C) and about 2 or 3 assembly routines. I'm using yasm as my assembler and gcc 4.1.2 for my C compiler, and GNU ld version 2.17.50.0.6-2.fc6...
0
1086
by: winkatl1213 | last post by:
I was wondering if anyone could help me with cross-compiling Python 2.5.1 to a MIPS target. The approach I'm using is based off the suggestion in the README file that comes with the python source distribution. I managed to get the configure script to run using the following command line: $ ../Python-2.5.1/configure --host=mips-linux...
1
4769
by: ac.c.2k7 | last post by:
Hi All, While doing the cross compilation of pkg_config for directFB for MIPS target from i86 platform, i am getting the following error. "checking for extra flags to get ANSI library prototypes... configure: error: cannot run test program while cross compiling." Can any body help in this regard? Thanks in advance. Regards.
1
2558
by: Otacon22 | last post by:
Hi all, I want to create a robot with a router board based on processor atheros 2.6, called "fonera". I have installed a version of linux, Openwrt and python and i want to use it for some reasons, but i have problems to have access to GPIO pins on the board to read and write on harware(pic, memories...) so i want to include into python a...
8
4797
Dheeraj Joshi
by: Dheeraj Joshi | last post by:
Hi Guys... I want to cross compile the PHP source to a target machine... Does anybody knows what are the steps to do that? Regards Dheeraj Joshi
0
7839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8216
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.