Skip to content

Commit

Permalink
Only compile library files with the -fPIC flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
bruceg committed Nov 24, 2006
1 parent 9ea326f commit 3fb694b
Show file tree
Hide file tree
Showing 22 changed files with 204 additions and 187 deletions.
5 changes: 0 additions & 5 deletions TODO
@@ -1,8 +1,3 @@
Figure out how to get rid of -fPIC in conf-cc
Maybe make conf-ccso and conf-ldso, with flags to add to the normal
conf-cc and conf-ld ?
Only compile files in lib/ and *=so with PIC flags

Fixup man pages and FAQ.idx regarding modsub and remote contents
?Remove "dir" argument from getconf?

Expand Down
4 changes: 2 additions & 2 deletions alloc=l
@@ -1,2 +1,2 @@
lib/alloc.o
lib/alloc_re.o
lib/alloc.lo
lib/alloc_re.lo
3 changes: 2 additions & 1 deletion auto-ccld.sh.do
@@ -1,6 +1,7 @@
dependon conf-cc conf-ld conf-ldso warn-auto.sh
dependon conf-cc conf-cclo conf-ld conf-ldso warn-auto.sh
formake '( cat warn-auto.sh; \'
formake 'echo CC=\'\''`head -n 1 conf-cc`\'\''; \'
formake 'echo CCLO=\'\''`head -n 1 conf-cclo`\'\''; \'
formake 'echo LD=\'\''`head -n 1 conf-ld`\'\''; \'
formake 'echo LDSO=\'\''`head -n 1 conf-ldso`\'\''; \'
formake ') > auto-ccld.sh'
2 changes: 1 addition & 1 deletion conf-cc
@@ -1,3 +1,3 @@
gcc -O -g -fPIC -I/usr/include/mysql -I/usr/include/pgsql -Wall -Wcast-align -Wwrite-strings -Wunused-parameter -Wsign-compare
gcc -O -g -I/usr/include/mysql -I/usr/include/pgsql -Wall -Wcast-align -Wwrite-strings -Wunused-parameter -Wsign-compare

This will be used to compile .c files.
4 changes: 4 additions & 0 deletions conf-cclo
@@ -0,0 +1,4 @@
-fPIC

These flags will be added to the command line given in conf-cc when
compiling library files.
5 changes: 3 additions & 2 deletions conf-ldso
@@ -1,3 +1,4 @@
gcc -shared -L/usr/local/pgsql/lib -L/usr/lib/mysql
-shared

This will be used to link .o files into a shared object.
These flags will be added to the command line given in conf-ld when
linking shared objects.
4 changes: 2 additions & 2 deletions default.do
Expand Up @@ -35,12 +35,12 @@ then
fi

case "$1" in
compile|load|makelib|makeso)
compile|libcompile|load|makelib|makeso)
dependon make-$1 warn-auto.sh systype
formake "( cat warn-auto.sh; ./make-$1 "'"`cat systype`"'" ) > $1"
formake "chmod 755 $1"
;;
make-compile|make-load|make-makelib|make-makeso)
make-compile|make-libcompile|make-load|make-makelib|make-makeso)
dependon $1.sh auto-ccld.sh
formake "cat auto-ccld.sh $1.sh > $1"
formake "chmod 755 $1"
Expand Down
4 changes: 4 additions & 0 deletions default.lo.do
@@ -0,0 +1,4 @@
directtarget
dependon libcompile
dependcc $2.c
formake ./libcompile $2.c
4 changes: 2 additions & 2 deletions error=l
@@ -1,2 +1,2 @@
lib/error.o
lib/error_str.o
lib/error.lo
lib/error_str.lo
12 changes: 6 additions & 6 deletions fs=l
@@ -1,6 +1,6 @@
lib/fmt_str.o
lib/fmt_uint.o
lib/fmt_uint0.o
lib/fmt_ulong.o
lib/scan_ulong.o
lib/scan_8long.o
lib/fmt_str.lo
lib/fmt_uint.lo
lib/fmt_uint0.lo
lib/fmt_ulong.lo
lib/scan_ulong.lo
lib/scan_8long.lo
4 changes: 2 additions & 2 deletions getln=l
@@ -1,2 +1,2 @@
lib/getln.o
lib/getln2.o
lib/getln.lo
lib/getln2.lo
254 changes: 127 additions & 127 deletions libezmlm=l
@@ -1,127 +1,127 @@
lib/alloc.o
lib/alloc_re.o
lib/altpath.o
lib/author.o
lib/auto_bin.o
lib/auto_cron.o
lib/auto_etc.o
lib/auto_lib.o
lib/auto_qmail.o
lib/auto_version.o
lib/byte_chr.o
lib/byte_copy.o
lib/byte_cr.o
lib/byte_diff.o
lib/byte_rchr.o
lib/byte_zero.o
lib/case_diffb.o
lib/case_diffs.o
lib/case_lowerb.o
lib/case_startb.o
lib/case_starts.o
lib/concatHDR.o
lib/config.o
lib/constmap.o
lib/cookie.o
lib/copy.o
lib/date2yyyymm.o
lib/date822fmt.o
lib/dateline.o
lib/datetime.o
lib/decodeB.o
lib/decodeHDR.o
lib/decodeQ.o
lib/die_badaddr.o
lib/die_badformat.o
lib/die_dow.o
lib/die_nomem.o
lib/die_sender.o
lib/die_usage.o
lib/encodeB.o
lib/encodeQ.o
lib/env.o
lib/envread.o
lib/error.o
lib/error_str.o
lib/fd_copy.o
lib/fd_move.o
lib/fmt_str.o
lib/fmt_uint.o
lib/fmt_uint0.o
lib/fmt_ulong.o
lib/getconf.o
lib/getconf_ulong.o
lib/getln.o
lib/getln2.o
lib/hdr_add.o
lib/hdr_boundary.o
lib/hdr_ctboundary.o
lib/hdr_datemsgid.o
lib/hdr_from.o
lib/hdr_listsubject.o
lib/hdr_mime.o
lib/hdr_transferenc.o
lib/idxthread.o
lib/lock_ex.o
lib/lock_exnb.o
lib/lockfile.o
lib/log.o
lib/makehash.o
lib/makepath.o
lib/now.o
lib/open_append.o
lib/open_read.o
lib/open_trunc.o
lib/qmail.o
lib/qmail_copy.o
lib/quote.o
lib/scan_8long.o
lib/scan_ulong.o
lib/seek_set.o
lib/sgetopt.o
lib/sig_catch.o
lib/sig_pipe.o
lib/slurp.o
lib/slurpclose.o
lib/str_chr.o
lib/str_cpy.o
lib/str_diff.o
lib/str_diffn.o
lib/str_len.o
lib/str_rchr.o
lib/str_start.o
lib/stralloc_arts.o
lib/stralloc_cat.o
lib/stralloc_catb.o
lib/stralloc_cats.o
lib/stralloc_copy.o
lib/stralloc_eady.o
lib/stralloc_num.o
lib/stralloc_opyb.o
lib/stralloc_opys.o
lib/stralloc_pend.o
lib/strerr.o
lib/strerr_die.o
lib/strerr_sys.o
lib/subdb.o
lib/subfderr.o
lib/subfdin.o
lib/subfdout.o
lib/subgetopt.o
lib/subhash.o
lib/substdi.o
lib/substdio.o
lib/substdio_copy.o
lib/substdo.o
lib/surf.o
lib/surfpcs.o
lib/unfoldHDR.o
lib/wait_pid.o
lib/wrap_chdir.o
lib/wrap_execbin.o
lib/wrap_execsh.o
lib/wrap_execv.o
lib/wrap_exitcode.o
lib/wrap_fork.o
lib/wrap_stat.o
lib/wrap_waitpid.o
lib/alloc.lo
lib/alloc_re.lo
lib/altpath.lo
lib/author.lo
lib/auto_bin.lo
lib/auto_cron.lo
lib/auto_etc.lo
lib/auto_lib.lo
lib/auto_qmail.lo
lib/auto_version.lo
lib/byte_chr.lo
lib/byte_copy.lo
lib/byte_cr.lo
lib/byte_diff.lo
lib/byte_rchr.lo
lib/byte_zero.lo
lib/case_diffb.lo
lib/case_diffs.lo
lib/case_lowerb.lo
lib/case_startb.lo
lib/case_starts.lo
lib/concatHDR.lo
lib/config.lo
lib/constmap.lo
lib/cookie.lo
lib/copy.lo
lib/date2yyyymm.lo
lib/date822fmt.lo
lib/dateline.lo
lib/datetime.lo
lib/decodeB.lo
lib/decodeHDR.lo
lib/decodeQ.lo
lib/die_badaddr.lo
lib/die_badformat.lo
lib/die_dow.lo
lib/die_nomem.lo
lib/die_sender.lo
lib/die_usage.lo
lib/encodeB.lo
lib/encodeQ.lo
lib/env.lo
lib/envread.lo
lib/error.lo
lib/error_str.lo
lib/fd_copy.lo
lib/fd_move.lo
lib/fmt_str.lo
lib/fmt_uint.lo
lib/fmt_uint0.lo
lib/fmt_ulong.lo
lib/getconf.lo
lib/getconf_ulong.lo
lib/getln.lo
lib/getln2.lo
lib/hdr_add.lo
lib/hdr_boundary.lo
lib/hdr_ctboundary.lo
lib/hdr_datemsgid.lo
lib/hdr_from.lo
lib/hdr_listsubject.lo
lib/hdr_mime.lo
lib/hdr_transferenc.lo
lib/idxthread.lo
lib/lock_ex.lo
lib/lock_exnb.lo
lib/lockfile.lo
lib/log.lo
lib/makehash.lo
lib/makepath.lo
lib/now.lo
lib/open_append.lo
lib/open_read.lo
lib/open_trunc.lo
lib/qmail.lo
lib/qmail_copy.lo
lib/quote.lo
lib/scan_8long.lo
lib/scan_ulong.lo
lib/seek_set.lo
lib/sgetopt.lo
lib/sig_catch.lo
lib/sig_pipe.lo
lib/slurp.lo
lib/slurpclose.lo
lib/str_chr.lo
lib/str_cpy.lo
lib/str_diff.lo
lib/str_diffn.lo
lib/str_len.lo
lib/str_rchr.lo
lib/str_start.lo
lib/stralloc_arts.lo
lib/stralloc_cat.lo
lib/stralloc_catb.lo
lib/stralloc_cats.lo
lib/stralloc_copy.lo
lib/stralloc_eady.lo
lib/stralloc_num.lo
lib/stralloc_opyb.lo
lib/stralloc_opys.lo
lib/stralloc_pend.lo
lib/strerr.lo
lib/strerr_die.lo
lib/strerr_sys.lo
lib/subdb.lo
lib/subfderr.lo
lib/subfdin.lo
lib/subfdout.lo
lib/subgetopt.lo
lib/subhash.lo
lib/substdi.lo
lib/substdio.lo
lib/substdio_copy.lo
lib/substdo.lo
lib/surf.lo
lib/surfpcs.lo
lib/unfoldHDR.lo
lib/wait_pid.lo
lib/wrap_chdir.lo
lib/wrap_execbin.lo
lib/wrap_execsh.lo
lib/wrap_execv.lo
lib/wrap_exitcode.lo
lib/wrap_fork.lo
lib/wrap_stat.lo
lib/wrap_waitpid.lo
3 changes: 3 additions & 0 deletions make-libcompile.sh
@@ -0,0 +1,3 @@
echo 'source=$1; shift'
echo 'base=`echo "$source" | sed -e s:\\\\.c$::`'
echo exec "$CC $CCLO" '-I. -o "$base".lo -c "$source" ${1+"$@"}'
2 changes: 1 addition & 1 deletion make-makeso.sh
@@ -1 +1 @@
echo exec "$LDSO" -L. -o '${1+"$@"}'
echo exec "$LD $LDSO" -L. -o '${1+"$@"}'
6 changes: 3 additions & 3 deletions open=l
@@ -1,3 +1,3 @@
lib/open_append.o
lib/open_read.o
lib/open_trunc.o
lib/open_append.lo
lib/open_read.lo
lib/open_trunc.lo
26 changes: 13 additions & 13 deletions str=l
@@ -1,13 +1,13 @@
lib/str_len.o
lib/str_diff.o
lib/str_diffn.o
lib/str_cpy.o
lib/str_chr.o
lib/str_rchr.o
lib/str_start.o
lib/byte_chr.o
lib/byte_rchr.o
lib/byte_diff.o
lib/byte_copy.o
lib/byte_cr.o
lib/byte_zero.o
lib/str_len.lo
lib/str_diff.lo
lib/str_diffn.lo
lib/str_cpy.lo
lib/str_chr.lo
lib/str_rchr.lo
lib/str_start.lo
lib/byte_chr.lo
lib/byte_rchr.lo
lib/byte_diff.lo
lib/byte_copy.lo
lib/byte_cr.lo
lib/byte_zero.lo
18 changes: 9 additions & 9 deletions stralloc=l
@@ -1,10 +1,10 @@
lib/stralloc_eady.o
lib/stralloc_pend.o
lib/stralloc_copy.o
lib/stralloc_opys.o
lib/stralloc_opyb.o
lib/stralloc_cat.o
lib/stralloc_cats.o
lib/stralloc_eady.lo
lib/stralloc_pend.lo
lib/stralloc_copy.lo
lib/stralloc_opys.lo
lib/stralloc_opyb.lo
lib/stralloc_cat.lo
lib/stralloc_cats.lo
lib/stralloc_catb.o
lib/stralloc_arts.o
lib/stralloc_num.o
lib/stralloc_arts.lo
lib/stralloc_num.lo

0 comments on commit 3fb694b

Please sign in to comment.