This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [parisc-linux] [patch] Remove magic constant from gas/tc-hppa.c


On Sat, Oct 21, 2006 at 02:17:19PM -0400, Jeff Bailey wrote:
> @@ -105,12 +105,6 @@ typedef som_symbol_type obj_symbol_type;
>  #endif
>  #endif /* OBJ_SOM */
>  
> -#if TARGET_ARCH_SIZE == 64
> -#define DEFAULT_LEVEL 25
> -#else
> -#define DEFAULT_LEVEL 10
> -#endif
> -
>  /* Various structures and types used internally in tc-hppa.c.  */
>  
>  /* Unwind table and descriptor.  FIXME: Sync this with GDB version.  */
> @@ -8259,7 +8253,11 @@ md_begin (void)
>    call_info_root = NULL;
>  
>    /* Set the default machine type.  */
> -  if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, DEFAULT_LEVEL))
> +#if TARGET_ARCH_SIZE == 64
> +  if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, bfd_mach_hppa10))
> +#else
> +  if (!bfd_set_arch_mach (stdoutput, bfd_arch_hppa, bfd_mach_hppa20w))
> +#endif
>      as_warn (_("could not set architecture and machine"));
>  
>    /* Folding of text and data segments fails miserably on the PA.

My personal preference would be to see this patch as:

 #if TARGET_ARCH_SIZE == 64
-#define DEFAULT_LEVEL 25
+#define DEFAULT_LEVEL bfd_mach_hppa20w
 #else
-#define DEFAULT_LEVEL 10
+#define DEFAULT_LEVEL bfd_mach_hppa10
 #endif

... particularly since you seem to have got them the wrong way round in
this patch.

I'd also dearly love it if someone could unify the hppa and hppa64 ports
so we don't have to build two toolchains for one port.  Just like sparc,
mips, s390 and i386.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]