Hi Tristan,

> 
> Fine.  What is the difference between mingw32 and mingw32msvc ?
> 

I don't know, really. I guess the mingw32 prefix is somewhat older.

>> Relevant changes:
>> - Added --AS and --LD options to ghdl1 for explicit asm/linker
>> specification
> 
> Why not, but I think there should be default for AS and GCC in
> default_pathes.ads
> 
> I think you should use --LINKER instead of --LD, as the program
> spawned is not ld but gcc.
> 

Agree, this might be misleading.
Also, I just realized something must have gotten out of sync, as I had
put the defaults into the generated default_pathes.ads.
I have to recreate the patch, will also add your input.

More comments below.


> 
> Unrelated, but why not.
> 

Just to avoid having to specify trailing '/' in the defines (for
consistence).


> 
> Is TARGET_CC correct ? Shouldn't that be named GCC_FOR_TARGET ?

Will look into that, could probably be turned into GCC_FOR_TARGET.

> 

>> +GNATMAKE_FOR_TARGET = $(shell echo gnatmake | \
>> +    sed '$(program_transform_name)')
>> +
>> +GNATBIND_FOR_TARGET = $(shell echo gnatbind | \
>> +    sed '$(program_transform_name)')
> 
> I think this is not correct.  program_transform_name is independent
> from cross configuration.  OTOH, I don't know the correct notation.
> 

Sorry again, that was the old incorrect hack, the correct gnat tool path
should be derived from the build time sysroot. I'll dig this up again.


> Maybe replace gcc by gnatmake in GCC_FOR_TARGET (although might be
> a problem with other compilers)
> 
>> +TARGET_CC = $(shell echo gcc | \
>> +    sed '$(program_transform_name)')
>> +
>> +# Install the driver program as ghdl or $(CROSS)-ghdl.
>>  vhdl.install-common: ghdl$(exeext)
>>      -mkdir $(DESTDIR)$(bindir)
>>      -$(RM) $(DESTDIR)$(bindir)/ghdl$(exeext)
>> -    $(INSTALL_PROGRAM) ghdl$(exeext) $(DESTDIR)$(bindir)/ghdl$(exeext)
>> +    $(INSTALL_PROGRAM) ghdl$(exeext)
>> $(DESTDIR)$(bindir)/$(GHDL_INSTALL_NAME)
>>  # Install the library
>>      $(MAKE_IN_VHDL) install-ghdllib
>>
>> diff -r 6de9ed66d019 translate/gcc/Makefile.in
>> --- a/translate/gcc/Makefile.in      Sat Feb 01 04:43:41 2014 +0100
>> +++ b/translate/gcc/Makefile.in      Sun Feb 02 16:56:41 2014 +0100
>> @@ -80,7 +80,7 @@
>>  X_ADAFLAGS =
>>  T_ADAFLAGS =
>>
>> -ADAC = $(CC)
>> +ADAC ?= $(CC)
>>
>>  ECHO = echo
>>  CHMOD = chmod
>> @@ -122,8 +122,8 @@
>>  # We don't use cross-make.  Instead we use the tools from the build
>>  tree,
>>  # if they are available.
>>  # program_transform_name and objdir are set by configure.in.
>> -program_transform_name =
>> -objdir = .
>> +# program_transform_name =
>> +# objdir = .
>>
>>  target=@target@
>>  target_alias=@target_alias@
>> @@ -197,7 +197,8 @@
>>  LIB93_DIR:=./lib/v93
>>  LIB87_DIR:=./lib/v87
>>  LIBSRC_DIR:=$(srcdir)/libraries
>> -ANALYZE=../ghdl -a --GHDL1=../ghdl1 --ieee=none
>> +ANALYZE=../ghdl -a --GHDL1=../ghdl1 --ieee=none \
>> +     --AS=$(AS_FOR_TARGET) --LD=$(LD_FOR_TARGET)
> 
> That shouldn't be necessary.
> 

Well, there is the case, where things are built in a sandbox using a
bootstrap toolchain, so there is no preinstalled system assembler or
linker (kinda standard case for clean builds of debian packages). Then
it might come in handy to allow explicit specification.

For example, the default ´as´ will point to /usr/<arch>/bin/as in
default_pathes.ads, but for build time compilation,
/scratch/build/sandbox/<arch>/bin/as is used.

> 
> This is ok (just replace --LD by --LINKER)

Going todo.


> 
> If mingw32 is the same as mingw32msvc, merge both configs.
> 

Maybe mingw32 is still used for native windows builds. Anyone?


> 
> I will merge the correct parts.
> 

Ok, thanks!

- Martin

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to