Introduction
This page is aimed at both Debian and upstream developers, talking about things to keep in mind when developing a program or packaging it so that it remains portable.
Contents
See also
http://www.bddebian.com/~hurd-web/hurd/running/debian/porting/
http://www.macieira.org/blog/2012/01/assembly-developers-library/
http://www.macieira.org/blog/2012/01/architectures-and-abis-detailed/
Cross Compiling
Terminology
- Host
- The system the software is being compiled on. In GNU terminology, this is the "build" system.
- Target
- The system the software will run on. GNU calls this "host".
Package Build
($DEB_BUILD_ARCH, $DEB_HOST_ARCH & co.)
Building and Running Tools
Best Practices
Autoconf and Automake
(how to build a toplevel project)
Programming Considerations
(Link to ArchitectureSpecificsMemo?)
Integral Types
Endianness
Alignment
Floating Point Behaviour
Page Sizes
Feature vs System detection
System detection (usually wrong)
config.{guess,sub}
uname
CPP system macros
Other system checks ...
Check for specific functionality (good)
(autoconf)
Build Failures
Unportable ioctls
Limiting macros
(PATH_MAX and friends)
Optional POSIX features
Kernel/System dependencies
(linuxisms: mount, linuxthreads abuse) (bsdisms: sys_errlist[] vs. strerror())
Runtime Failures
/proc
/sys
devfs on kFreeBSD
(some nodes are not allowed on FreeBSD's devfs)
Missing kernel features
(sysv shm)
Hardcoded values instead of using macros
(open())
