472,364 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,364 software developers and data experts.

-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_compiling" = yes; then
ac_cv_no_strict_aliasing_ok=no
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ why?

else
Jan 16 '08 #1
3 2812
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.loewis.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
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
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...
0
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...
1
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...
3
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...
0
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...
1
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...
1
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...
8
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
2
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and efficiency. While initially associated with cryptocurrencies...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge required to effectively administer and manage Oracle...
1
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand. Background colors can be used to highlight important...
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
2
by: Ricardo de Mila | last post by:
Dear people, good afternoon... I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control. Than I need to discover what...
1
by: ezappsrUS | last post by:
Hi, I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
0
by: jack2019x | last post by:
hello, Is there code or static lib for hook swapchain present? I wanna hook dxgi swapchain present for dx11 and dx9.

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.