LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-29-2008, 03:44 PM   #1
%$hfydt%$
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Rep: Reputation: 0
"make" does not work with command line arguements


when I type "make arch=arm help" I get output for
the default i386 architecture instead of for the ARM architecture. This also leads to problems with cross compilation for the ARM platform. Top level Makefile appears to be where problem starts but I can't see it.

Thanks for any help
 
Old 03-29-2008, 04:04 PM   #2
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Where's the Makefile Section?

Why not post enough of the makefile here, so someone can look at it?
 
Old 03-29-2008, 04:18 PM   #3
%$hfydt%$
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ )

# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.

# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile

ARCH ?= $(SUBARCH)
CROSS_COMPILE ?=



if I change to ARCH = arm, it will work, but this is an unacceptable bandaid.
 
Old 03-30-2008, 02:42 PM   #4
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Is symbol defined correctly?

I thought symbols were defined

MYMODS=mod1.o mod2.o mod3.o
 
Old 03-30-2008, 04:19 PM   #5
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Quote:
if I change to ARCH = arm, it will work, but this is an unacceptable bandaid.
Why is it "unacceptable" ?
 
Old 03-30-2008, 06:06 PM   #6
%$hfydt%$
LQ Newbie
 
Registered: Sep 2003
Posts: 5

Original Poster
Rep: Reputation: 0
why is it unacceptable ??

you never want to hard variables, especially envirionment variables in makefiles. Are you familiar with the kernel configuration subsystem?
 
Old 03-31-2008, 12:27 PM   #7
tredegar
Guru
 
Registered: May 2003
Location: London, UK
Distribution: Ubuntu 10.04, mostly
Posts: 6,007

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
Oooooo Kkkkkkk.
Now I begin to understand the question.
Are you familiar with asking questions?
 
Old 04-01-2008, 10:59 AM   #8
cmnorton
Member
 
Registered: Feb 2005
Distribution: Ubuntu, CentOS
Posts: 585

Rep: Reputation: 35
Additional Information

Quote:
Originally Posted by cmnorton View Post
I thought symbols were defined

MYMODS=mod1.o mod2.o mod3.o
This post is in response to an external email I received.

I am not familiar with the subsystem for this makefile. I was curious as to how the symbol had been defined, and thought that might me one of the problems.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
So many errors when I typed the "make" and "make install" command Niceman2005 Linux - Software 23 07-22-2009 02:33 PM
Make "ls" command show colors without "--color=always" switch SharpyWarpy Linux - General 4 07-16-2007 11:00 PM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 11:49 AM
"make" command doesn´t work Syntron Linux - General 2 10-19-2004 08:31 AM
"make" command won't work in Fedora...installing Nvidia Ethernet drv's help Ge|atinousFury Linux - Hardware 24 01-22-2004 04:42 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration