You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Matthias Loepfe <Ma...@AdNovum.CH> on 1999/07/28 21:03:31 UTC

general/4785: support for (loadable) C++ modules

>Number:         4785
>Category:       general
>Synopsis:       support for (loadable) C++ modules
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Wed Jul 28 12:10:03 PDT 1999
>Last-Modified:
>Originator:     Matthias.Loepfe@AdNovum.CH
>Organization:
apache
>Release:        1.3.6
>Environment:
Solaris 2.6
Sun cc/CC 4.0/4.2/5.0
>Description:
If you write modules in C++, at least on Solaris, it is necessary to use CC (not
cc or ld) to link the executable.

It would be nice if it could be configured if the httpd should be linked with CC
instead of cc. I would even propose to use CC as default (if available), so that
any (later added) loadable C++ modules don't get problems.
>How-To-Repeat:
compile a loadable module with CC instead of cc.
>Fix:
My poormans solution is to set LINKER=CC in my environment after applying 
the following patch:

*** apache_1.3.6/src/Makefile.tmpl	Tue Jul 27 22:22:19 1999
--- apache_1.3.6-2.3.9/src/Makefile.tmpl	Tue Jul 27 22:38:31 1999
***************
*** 33,39 ****
  
  target_static: subdirs modules.o
  	$(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
! 	$(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
  	      -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(LIBS)
  
  target_compile_only: subdirs modules.o
--- 33,39 ----
  
  target_static: subdirs modules.o
  	$(CC) -c $(INCLUDES) $(CFLAGS) buildmark.c
! 	$(LINKER) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_SHLIB_EXPORT) \
  	      -o $(TARGET) buildmark.o $(OBJS) $(REGLIB) $(LIBS)
  
  target_compile_only: subdirs modules.o
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <ap...@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]