This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Help with -lang-c option to preprocessor


 
Hi Ian,
	This is the error I get when I try to build the binary on the
new CentOS host using gcc 3.3.1. The same setting works perfectly fine
on our old Linux 2.1 box(gcc 2.96)

Error
======

cc1: error: unrecognized option `-WO0'
cc1: error: unrecognized option `-lang-c'
gmake: *** [bsapi_acct_status.o] Error 1


The Makefile contents are as given below
=========================================

#
# Makefile to build bsapi library
#
LIB     = bsapi.sl

#
# MK_* stuff
#
MK_TARGETS =    $(LIB)
MK_OPTIONS =    SOML EZDB SNAC KRAFT
MK_INCLUDES =   -I../include \
                -I$(TOP)/Batch/batchcommon/include \
                -I$(TOP)/cibs/include \
                -I$(TOP)/cibs/error \
                -I$(TOP)/pcs \
                -I$(TOP)/ianda/convenient_stuff \
                -I$(TOP)/pulse8/api/include \
                -I$(TOP)/mbase/include \
                -I$(TOP)/acct_io \
                -I$(TOP)/acct_io/lib \
                -I$(TOP)/Batch/batchsapi/server \
#!!!            -I$(TOP)/acct_io/throttle \

MK_DEPENDFLAG    = -M

MK_CFLAGS_DEBUGGINGFLAGS = -DSAPI_BUILD=1

include $(TOP)/template2/Makefile.h

OS_CFLAGS_OPTIMIZERFLAGS = -O3

CFLAGS += -fPIC -Wp,-WO0,-lang-c

SH_LDOPTS=-shared

$(MK_TARGETS):  $(MK_OBJS)
                ld -o $@ $(SH_LDOPTS) $(MK_OBJS) $(LIBS)

objs:           $(MK_OBJS)


===================================================================


Thanks,
Sayee 

-----Original Message-----
From: Ian Lance Taylor [mailto:iant@google.com] 
Sent: Thursday, July 23, 2009 1:20 PM
To: Sathyanarayanan, Sayee
Cc: gcc-help@gcc.gnu.org
Subject: Re: Help with -lang-c option to preprocessor

"Sathyanarayanan, Sayee" <s.sathyanarayanan@corp.aol.com> writes:

> We have some Old SAPI C applications that were built using gcc 2.96 
> and we are moving to CentOS 4 and are currently using gcc 3.3.1. 
> Initially we passed the options -WO0,-lang-c to the preprocessor. This

> is not recognized in the newer version of gcc. Could you please assist

> in rebuilding this binary. I tried passing  -x c to the preprocessor 
> using Wp but to no avail.

gcc 2.96 is ancient and even gcc 3.3.1 is very old.  The current version
of gcc is 4.4.0.

Normally you should not need to pass -lang-c or -x c to the
preprocessor.  I think gcc 3.3.1 included the integrated preprocessor in
any case.  I think you need to tell us what you are doing and what is
going wrong.

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]