LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-02-2011, 12:44 AM   #1
daniil
LQ Newbie
 
Registered: Sep 2009
Posts: 28

Rep: Reputation: 0
cross compile httpd


Hello.

I try to cross compile httpd for power pc.

It seems that configure doesn't detect cross compilation.

The first error was that sizeof (void*) is less than (long), so I have commented out that check (I think it is a hard work around).

So I've got another error ./dftables: cannoct execute binary file.
Why it tries to execute binary for ppc on x86 machine?

This is my build script.

Regards,
Daniil

#!/bin/sh

NAME=httpd-2.2.17

PWD=$(pwd)


CS_TOOLCHAIN_PATH=$PWD/sdk/apm-2010.09
SYSROOT=$PWD/sdk/V1.2/44xFP/staging
PATH=$CS_TOOLCHAIN_PATH/bin:$PATH
CROSS_COMPILE=powerpc-apm-linux-gnu-
ARCH=powerpc

export CS_TOOLCHAIN PATH CROSS_COMPILE SYSROOT ARCH

CC=powerpc-apm-linux-gnu-gcc
CPP=powerpc-apm-linux-gnu-cpp
AS=powerpc-apm-linux-gnu-as
ASCPP=powerpc-apm-linux-gnu-as
AR=powerpc-apm-linux-gnu-ar
RANLIB=powerpc-apm-linux-gnu-ranlib
CXXCPP=powerpc-apm-linux-gnu-cpp
CXX=powerpc-apm-linux-gnu-g++
LD=powerpc-apm-linux-gnu-ld
STRIP=powerpc-apm-linux-gun-strip
CFLAGS="-mcpu=440fp -mtune=440fp --sysroot $SYSROOT"
LDFLAGS=-L$SYSROOT/lib

export CC CPP AS ASCPP AR RANLIB CXXCPP CXX LD STRIP CFLAGS LDFLAGS

PREFIX=$PWD/pkg/$NAME/wwwroot
cd src/$NAME

#
# Comment out checking out for sizeof(void*) < sizeof (long) in configure file.
#
./configure --prefix=$PREFIX \
--build=i586-linux \
--host=powerpc-linux \
--with-z=$SYSROOT/lib \
--enable-so \
ac_cv_file__dev_zero="yes" \
ac_cv_func_setpgrp_void="yes" \
apr_cv_process_shared_works="yes" \
apr_cv_mutex_robust_shared="no" \
apr_cv_tcp_nodelay_with_cork="yes" \
ac_cv_sizeof_struct_iovec="8" \
apr_cv_mutex_recursive="yes"

make install

cd ../../pkg
tar czf $NAME.tar.gz $NAME
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to cross compile qmail tamilm Linux - Networking 1 10-14-2008 10:01 AM
How to cross compile? jiyun0121 Linux - General 3 09-01-2005 06:15 PM
Qt Cross Compile werewolfolondon Linux - Software 2 02-25-2005 01:01 PM
cross compile zaicheke Linux - Software 7 01-20-2005 08:23 PM
How to cross-compile? karfei00 Linux - Laptop and Netbook 2 06-03-2004 09:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration