Chapter 10. Files
78
the default). Some programs might fail to build or run at this level of optimization; it may
be necessary to use
 O1
, for example.
nostrip This string means that the debugging symbols should not be stripped from the binary
during installation, so that debugging information may be included in the package.
The following makefile snippet is an example of how one may implement the build options;
you will probably have to massage this example in order to make it work for your package.
CFLAGS =  Wall  g
INSTALL = install
INSTALL_FILE
= $(INSTALL)  p
 o root  g root
 m
644
INSTALL_PROGRAM = $(INSTALL)  p
 o root  g root
 m
755
INSTALL_SCRIPT
= $(INSTALL)  p
 o root  g root
 m
755
INSTALL_DIR
= $(INSTALL)  p  d  o root  g root
 m
755
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS +=  O0
else
CFLAGS +=  O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
INSTALL_PROGRAM +=  s
endif
It is up to the package maintainer to decide what compilation options are best for the package.
Certain binaries (such as computationally intensive programs) will function better with certain
flags (
 O3
, for example); feel free to use them. Please use good judgment here. Don't use flags
for the sake of it; only use them if there is good reason to do so. Feel free to override the up 
stream author's ideas about which compilation options are best: they are often inappropriate
for our environment.
10.2 Libraries
The shared version of a library must be compiled with
 fPIC
, and the static version must not
be. In other words, each source unit (
*.c
, for example, for C files) will need to be compiled
twice.
You must specify the gcc option
 D_REENTRANT
when building a library (either static or
shared) to make the library compatible with LinuxThreads.
Although not enforced by the build tools, shared libraries must be linked against all libraries
that they use symbols from in the same way that binaries are. This ensures the correct function 
ing of the shlibs system and guarantees that all libraries can be safely opened with
dlopen()
.
Packagers may wish to use the gcc option
 Wl, z,defs
when building a shared library. Since






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved