Adding default search path for CPP


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Adding default search path for CPP
# 1  
Old 09-05-2007
Adding default search path for CPP

Hi there,

I have built myself a GCC (3.4.4) for PowerPC with a cross compilation toolchain running on a x86, together with glibc-2.3.4 and binutils-2.16. On the PowerPC there is a system runnign already (only console ofc, nothing "cosy", kernel-2.6.15).

So my question is how to propperly "install" the newly built GCC on the PowerPC (there is no compiler available on it ATM). What I do is mount a partition under /usr1, secure-copy all the built files on the PowerPC machine, and add the binary directories under /usr1 to PATH.

Now, when I try to compile a Hello program the CPP doesn't find stdio.h for example, which is not what I wanted Smilie
I "dirty hacked" that by creating some symlinks in the default places where CPP searches for headers. It works, but I know I'm a sinner Smilie

So, how can I specifiy the search paths for CPP at compile time, or maybe also override the default ones? Because my "hack" works for single programs, but when I try to build a kernel for example, I need the kernel headers to be found by CPP. How is that achieved?

I configured the GCC as following:
Code:
/doocs/develop/boyanov/source/gcc-3.4.4/configure --build=i686-pc-linux-gnu 
--target=powerpc-unknown-linux-gnu
--host=powerpc-unknown-linux-gnu 
--prefix=/usr1/local 
--enable-threads=posix 
--enable-symvers=gnu 
--enable-shared 
--with-gcc-version-trigger=/doocs/develop/boyanov/source/gcc-3.4.4/gcc/version.c 
--no-create 
--no-recursion

Many thanks for the help in advance.
# 2  
Old 09-10-2007
Dude, I'm not sure if this will be of any help, but take a look at this.. Sorry if I didn't get the requirement correctly, I'll ask someone when I get to work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Php search path

Probably simple, but I don't see it. jack@veritron /u/email $ cat p3.php <?php require_once './lib/swift_required.php'; $x=get_include_path(); echo "$x \n"; set_include_path('./lib:./lib/classes:'.$x); $x=get_include_path(); echo "$x \n"; $transport =... (1 Reply)
Discussion started by: jgt
1 Replies

2. Shell Programming and Scripting

Adding to the end of the path in .profile

Hi there, I have the following in my path: export PATH=/usr/bin:/usr/sbin But I want to change it programmatically(for the purpose of JBoss automatic(ansible) installs) to: export PATH=/usr/bin:/usr/sbin:/usr/jdk/jdk1.8.0_60 and after that I need to insert the JAVA_HOME programmatically,... (7 Replies)
Discussion started by: hvdalsen
7 Replies

3. UNIX for Dummies Questions & Answers

How to add to the search path - bin?

Hi, Now I have: /Users/okn/bin for my private shell scripts. How do I add /Users/okn/bin to my PATH? The PATH is right now: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin The .bash_profile doesn't state anything about a PATH (yet). I read about this: PATH=/bin:$PATH
 export PATH or... (1 Reply)
Discussion started by: OmarKN
1 Replies

4. HP-UX

Adding Directories to PATH in HP-UX with csh

HI Guys, I am truing to add some directories to the productive HP-UX (like /usr/sbin) the problem is that i tried some methods like (export) and setenv but i failed. I add some logs output of the commands to provide you with more info . the user which I am trying to add this path is different... (5 Replies)
Discussion started by: barry1946
5 Replies

5. Shell Programming and Scripting

Shell or Perl (adding quote around path)

Hi Experts, I have a line as below: Text 351:2139 /opt/bo/boexi30/bobje/data/.bobj/registry/software/business objects/suite 12.0/olap intelligence/occa(o) What I need is: add a single quote around the path as below: chown 351:2139... (4 Replies)
Discussion started by: apatil65
4 Replies

6. Shell Programming and Scripting

Need help in sed: adding a line after each search block

Hi friends, I have written script that will search & display the block of sql statement. Since there are many blocks of sql statement i am finding it difficult to distinguish between them. The below is the sed command & its result exec sql abc abc abc... (2 Replies)
Discussion started by: frozensmilz
2 Replies

7. Shell Programming and Scripting

PATH dircetory search order

Hello I using CygWin and am working on project that requires whereby after I make some code changes and rebuild I have to manually copy the updated files into the install directory to test them. There is a build output directory where these files placed, but the program will not run from there.... (4 Replies)
Discussion started by: bobban
4 Replies

8. UNIX for Dummies Questions & Answers

adding PATH variable

Hello i use bash and i added a path variable for 2 files /rscr and /uscr in /etc/profile /rscr working fine but the other one shows command not found and when i try to type whereis for scripts in /rscr it shows them but the other one shows nothing... thanks :b: (3 Replies)
Discussion started by: wir3d
3 Replies

9. UNIX for Dummies Questions & Answers

Adding PATH variable in the startup scripts

Hi, I got a error message The environmental variable AUTOSYS is not set ! I think I require to to add a path to PATH variable in the startup scripts in the home dir. I tried using set PATH= but it is not setting the PATH when i do the echo $PATH , i dont get the new PATH reflected, Is... (5 Replies)
Discussion started by: rajanishshetty
5 Replies

10. UNIX for Dummies Questions & Answers

home directory in search path

Is it unsafe to put your own home directory (a regular user) in your search path? I am writing useful shell scripts, but don't have the permissions to put them in /usr/bin. (Korn shell) thanks (2 Replies)
Discussion started by: jpprial
2 Replies
Login or Register to Ask a Question