Paul Eggert wrote: > Joe Buehler writes: > > I have a mix of PA-RISC 1.1 and 2.0 processors and am continually having > > to manually add +DAportable to compile flags in order to get binaries to > > run on both kinds of machines (since I compile on a PA-RISC 2.0 machine). > > > > Is there some reason this is not currently added by autoconf? > > I don't think anyone has ever raised the issue before. I have vague memories of something several years ago. But it is the vendor's choice to default to the native system optimization. I think the user in this case would need to say more to get different behavior. And I think that is the right answer. Remember that by compiling for the other architecture you are effectively operating in a cross compilation mode. It is a simple crosscompile in this case but still not the native mode. The autotools support a large amount of cross compilation. But that is not the default behavior. The default is to compile for the native environment. I think that still makes the most sense. I also have a large mixed environment of HP-UX hardware. Except I have pretty much replaced PA1.1 in favor of PA2.0. My last remaining 80 MHz PA1.1 9000/712 just can't compete with modern machines. :-) So as one of the other people who has been affected by this for years I would still vote to keep autconf ignorant of DAportable. Using it would needlessly slow down users on systems which do not need compatibility to older architectures. It would force those users to supply a configuration to compile for the native architecture in order to gain back the performance. And there are available other methods of solving this problem which work equally well so it is unneeded. > Generally Autoconf defers to the compiler-supplier and/or the > installer on issues like these. Perhaps the simplest thing is for you > to add a simple shell-script wrapper that always passes +DAportable to > your compiler. Ralph suggested the use of 'CCOPTS' and 'LDOPTS' which are effectively global variables to the compiler and linker which pass extra options to them on HP-UX. The autotools don't know about them so they will cut through all layers completely transparently. This is what I do in my environment too. It works well for me. Bob