how-to question: architecture dependent source

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. I'm still working on learning autotools (been reading through all
the manuals) so bear with me. There is something I've been trying to
figure out, and I would appreciate any guidance:

So, I write C code, and typically try to make it as portable as
possible. However, I also am somewhat enthusiastic about amd64 assembly
programming (with GAS syntax) - and so I like to optimize code for that
architecture.

What I want my configure script to do is check if I am compiling on the
amd64 architecture, and if so:

* define something appropriate in the config.h, which I can use to
conditionally leave out the more generic C functions from source files, and

* Put some extra (assembly) source files in a variable (e.g.
amd64sort.S, amd64insert.S, amd64filter.S...) so that they can be
appended as extra source in the Makefile. Presumably I'd have something
like this in Makefile.am:

code:
--------
bin_PROGRAMS = myprogram
myprogram_SOURCES = ${ARCH_DEPS} myprogram.c
--------

I want to be able to have the assembly in separate source files, instead
of inline, for maintainability reasons.

-- 
frigidcode.com
indicium.us

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux