This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: ASM_SPECS on recent GCC 4.3.3 (4.X)


On Sun, 1 Mar 2009, Mark Mitchell wrote:

> >> I think there's some confusion here.  There is no relationship between
> >> the ASM_SPEC definition in a config *.h file regarding options to be
> >> passed to the assembler and the old "asmspec" parameter to
> >> rest_of_decl_compilation, which related to uses of the "__asm__(...)"
> >> extension in the source code.
> >>
> > Are you sure about that?
>
> Yes.

OK then should be the missing of the SUBTARGET_SWITCHES macro.

>
> > ASM_SPECS were always custom extra command line commands to be been passed
> > to the assembler right? So re-stating my question:
> > 1) the old way to do that (3.4.X branch ASM_SPEC) doesnt seem to work
> > anymore
> > 2) How do you do it in the 4.X.X branch...
>
> The same basic mechanisms will work.  Probably something is #undef'ing
> the macro after you define it, or you are confused about which header
> files are being used in your configuration.  You will have to get out
> the debugger and preprocessor to work out what's going on.
>

Configuration is the same as i?86-*-sol2 in gcc/config.gcc
The last file aka sol2.h is custom modified. There is nothing really
undef'ing the ASM_SPEC macro.
Hence the reason that the cc1 cannt get it right is because  the
subtarget switches macro is missing.
On the GCC 3.4.6 (aka 3.4 branch) we can see, say, in i386/sco5.h

#undef SUBTARGET_SWITCHES
#define SUBTARGET_SWITCHES                                      \
        { "elf", -MASK_COFF, N_("Generate ELF output")  },

Such kind of switches added to the TARGET_SWITCHES has carried through
from GCC 2.6 up to GCC-3.4.6 (inclusive). Then toplev.c picks up those.
It looks all these they have been eliminated on 4.3.3 (why?)
My question will be if anybody knows how you implemnt this type of well
known features on the latest GCC 4.3.X branch?

Regards,


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