public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* How to test binutils?
@ 2004-04-30 10:43 Houda Benabderrazik
  2004-05-05 15:58 ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Houda Benabderrazik @ 2004-04-30 10:43 UTC (permalink / raw)
  To: binutils

Hi,
Does anyone know how to build Gas and binutils after
adding new processor (tc-cpu.c tc-cpu.h)? 
How can i test what the program in Mac OS X?


Thanks

Houda


	

	
		
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to test binutils?
  2004-04-30 10:43 How to test binutils? Houda Benabderrazik
@ 2004-05-05 15:58 ` Nick Clifton
  2004-05-05 16:49   ` Houda Benabderrazik
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Clifton @ 2004-05-05 15:58 UTC (permalink / raw)
  To: Houda Benabderrazik; +Cc: binutils

Hi Houda,

>Does anyone know how to build Gas and binutils after
>adding new processor (tc-cpu.c tc-cpu.h)?
>  
>
You will probably need to add more files than these.  In particular you 
will probably need to create these files:

  bfd/cpu-<name>.c
  bfd/elf32-<name>.c   [I am assuming that you are using the ELF file 
format]
  opcodes/<name>-dis.c
  opcodes/<name>-asm.c

You will also need to add entries to the gas/configure.in, 
bfd/config.bfd, ld/configure.tgt, opcodes/configure.in and 
opcodes/disassembler.c files, as well as regenerating the various 
*/configure files and adding an entry to the top level config.sub file.

As for building GAS and binutils you should try to follow the standard 
procedure for building a cross-targeted toolchain.  ie create a separate 
build directory that is not part of the sources directories.  In that 
directory run the "configure" script from the top level of the sources 
directory and give it a command line switch of "--target=<name>-elf".  
If this succeeds then run "make".  If that passes then run "make check".

>How can i test what the program in Mac OS X?
>  
>
I am not quite sure what you mean here.  If you want to test to see if 
your new code works then the above procedure should be a good start.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to test binutils?
  2004-05-05 15:58 ` Nick Clifton
@ 2004-05-05 16:49   ` Houda Benabderrazik
  2004-05-05 17:30     ` Nick Clifton
  0 siblings, 1 reply; 4+ messages in thread
From: Houda Benabderrazik @ 2004-05-05 16:49 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils


Thank you very much for your answer Nick, 
Do i have to write all this files before testing any
one?
I want to know if there is the only method for
testing?
So, I can not for example just making a makefile.
Can i test without building cross-target? 

I think, i have to write some other files for ld for
example. 



 --- Nick Clifton <nickc@redhat.com> a écrit : > Hi
Houda,
> 
> >Does anyone know how to build Gas and binutils
> after
> >adding new processor (tc-cpu.c tc-cpu.h)?
> >  
> >
> You will probably need to add more files than these.
>  In particular you 
> will probably need to create these files:
> 
>   bfd/cpu-<name>.c
>   bfd/elf32-<name>.c   [I am assuming that you are
> using the ELF file 
> format]
>   opcodes/<name>-dis.c
>   opcodes/<name>-asm.c
> 
> You will also need to add entries to the
> gas/configure.in, 
> bfd/config.bfd, ld/configure.tgt,
> opcodes/configure.in and 
> opcodes/disassembler.c files, as well as
> regenerating the various 
> */configure files and adding an entry to the top
> level config.sub file.
> 
> As for building GAS and binutils you should try to
> follow the standard 
> procedure for building a cross-targeted toolchain. 
> ie create a separate 
> build directory that is not part of the sources
> directories.  In that 
> directory run the "configure" script from the top
> level of the sources 
> directory and give it a command line switch of
> "--target=<name>-elf".  
> If this succeeds then run "make".  If that passes
> then run "make check".
> 
> >How can i test what the program in Mac OS X?
> >  
> >
> I am not quite sure what you mean here.  If you want
> to test to see if 
> your new code works then the above procedure should
> be a good start.
> 
> Cheers
>   Nick
>  


	

	
		
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! 
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to test binutils?
  2004-05-05 16:49   ` Houda Benabderrazik
@ 2004-05-05 17:30     ` Nick Clifton
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Clifton @ 2004-05-05 17:30 UTC (permalink / raw)
  To: Houda Benabderrazik; +Cc: binutils

Hi Houda,

>Thank you very much for your answer Nick, 
>Do i have to write all this files before testing any
>one?
>  
>
Yes.  You can test to see if an individual file will just compile 
without needing the other files, but in order to build any of the 
binutils (gas, ld, objdump, etc)  you are going to need all of these 
files.  Oh and you will probably need to create an include/elf/<name.h> 
file as well.

The good news is that you can use the existing files in these 
directories as examples of how to create the new files.  Simply choose a 
port that you think is quite similar to your own (same size 
instructions, similar endian-ness, etc) and look to see what files were 
created for that port and what they contain.

>I want to know if there is the only method for
>testing?
>So, I can not for example just making a makefile.
>Can i test without building cross-target? 
>  
>

Sorry no.  The makefiles are automatically generated by the configure 
scripts.  So you need to run configure (and hence attempt to build a 
cross-targeted toolchain) in order to create the makefiles.  You can 
break this down however.  For example you do not need to create the 
files in ld/ in order to build GAS.  Similarly you do not need the files 
in gas/ in order to build the linker.  You will need the files in bfd/ 
opcodes/ and include/elf though for both the assembler, the linker and 
the other binary utilities.

Cheers
  Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-05-05 17:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-30 10:43 How to test binutils? Houda Benabderrazik
2004-05-05 15:58 ` Nick Clifton
2004-05-05 16:49   ` Houda Benabderrazik
2004-05-05 17:30     ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).