Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Dec 1998 10:41:01 +0530 (IST)
From:      Kapil Chowksey <kchowksey@hss.hns.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   bin/8930: [patch] Adding -d flag to xlint
Message-ID:  <199812020511.KAA22764@tarang.hss.hns.com>

next in thread | raw e-mail | index | archive | help

>Number:         8930
>Category:       bin
>Synopsis:       Adding -d flag to xlint
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec  1 20:30:00 PST 1998
>Last-Modified:
>Originator:     Kapil Chowksey
>Organization:
disorganised
>Release:        FreeBSD 3.0-CURRENT i386
>Environment:

FreeBSD elbereth.hss.hns.com 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Fri Nov 20 22:18:39 IST 1998 

>Description:

Included is a patch that adds -d flag to xlint. This flag takes an
argument as the directory name to use for standard include files. Ie.

	xlint -d /cross/usr/include

invokes

	cc -E -nostdinc -idirafter /cross/usr/include

This is in support of cross-builds of the freebsd tree. The flag is
compatible with NetBSD's lint.

>How-To-Repeat:

	Any 3.0-current system

>Fix:
	
Index: xlint/lint.1
===================================================================
RCS file: /cvs/src/usr.bin/xlint/xlint/lint.1,v
retrieving revision 1.5
diff -c -r1.5 lint.1
*** lint.1	1998/03/23 07:48:03	1.5
--- lint.1	1998/11/26 13:56:06
***************
*** 42,47 ****
--- 42,48 ----
  .Op Fl i Ns | Ns Fl nu
  .Op Fl D Ns Ar name Ns Op =def
  .Op Fl U Ns Ar name
+ .Op Fl d Ns Ar directory
  .Op Fl I Ns Ar directory
  .Op Fl L Ns Ar directory
  .Op Fl l Ns Ar library
***************
*** 52,57 ****
--- 53,59 ----
  .Op Fl s Ns | Ns Fl t
  .Fl C Ns Ar library
  .Op Fl D Ns Ar name Ns Op =def
+ .Op Fl d Ns Ar directory
  .Op Fl I Ns Ar directory
  .Op Fl U Ns Ar name
  .Ar
***************
*** 280,285 ****
--- 282,291 ----
  directive. If no definition is given,
  .Ar name
  is defined as 1.
+ .It Fl d Ns Ar directory
+ Use
+ .Ar directory
+ as the path containing the standard include files.
  .It Fl I Ns Ar directory
  Add
  .Ar directory
Index: xlint/xlint.c
===================================================================
RCS file: /cvs/src/usr.bin/xlint/xlint/xlint.c,v
retrieving revision 1.4
diff -c -r1.4 xlint.c
*** xlint.c	1997/03/11 14:49:51	1.4
--- xlint.c	1998/11/26 13:56:11
***************
*** 92,98 ****
  static	char	**libsrchpath;
  
  /* flags */
! static	int	iflag, oflag, Cflag, sflag, tflag, Fflag;
  
  /* print the commands executed to run the stages of compilation */
  static	int	Vflag;
--- 92,98 ----
  static	char	**libsrchpath;
  
  /* flags */
! static	int	iflag, oflag, Cflag, sflag, tflag, Fflag, dflag;
  
  /* print the commands executed to run the stages of compilation */
  static	int	Vflag;
***************
*** 365,371 ****
  		argv += optind;
  		optind = 0;
  
! 		c = getopt(argc, argv, "abceghil:no:prstuvxzC:D:FHI:L:U:V");
  
  		switch (c) {
  
--- 365,371 ----
  		argv += optind;
  		optind = 0;
  
! 		c = getopt(argc, argv, "abcd:eghil:no:prstuvxzC:D:FHI:L:U:V");
  
  		switch (c) {
  
***************
*** 451,456 ****
--- 451,465 ----
  			freelst(&deflibs);
  			break;
  
+ 		case 'd':
+ 			if (dflag)
+ 				usage();
+ 			dflag = 1;
+ 			appcstrg(&cppflags, "-nostdinc");
+ 			appcstrg(&cppflags, "-idirafter");
+ 			appcstrg(&cppflags, optarg);
+ 			break;
+ 			
  		case 'D':
  		case 'I':
  		case 'U':
Index: bsd.prog.mk
===================================================================
RCS file: /cvs/src/share/mk/bsd.prog.mk,v
retrieving revision 1.79
diff -c -r1.79 bsd.prog.mk
*** bsd.prog.mk	1998/10/18 09:35:17	1.79
--- bsd.prog.mk	1998/12/02 04:16:30
***************
*** 17,22 ****
--- 17,23 ----
  .if defined(DESTDIR)
  CFLAGS+= -I${DESTDIR}/usr/include
  CXXINCLUDES+= -I${DESTDIR}/usr/include/g++
+ LINTFLAGS+= -d${DESTDIR}/usr/include
  .endif
  
  .if !defined(DEBUG_FLAGS)


>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812020511.KAA22764>