X-Received: by 10.224.217.195 with SMTP id hn3mr21329346qab.5.1366677079776; Mon, 22 Apr 2013 17:31:19 -0700 (PDT) X-Received: by 10.50.33.175 with SMTP id s15mr5542505igi.8.1366677079670; Mon, 22 Apr 2013 17:31:19 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!gp5no1610174qab.0!news-out.google.com!ef9ni9516qab.0!nntp.google.com!gp5no4963620qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.os.linux.development.apps Date: Mon, 22 Apr 2013 17:31:19 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=98.149.173.153; posting-account=ifArewoAAACSU8geLwCR3_OSIEAPQEDJ NNTP-Posting-Host: 98.149.173.153 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <2f2f7f01-d728-49bd-af16-65559cd27bf5@googlegroups.com> Subject: environment variables in ld scripts From: Jay Braun Injection-Date: Tue, 23 Apr 2013 00:31:19 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.os.linux.development.apps:581 I have inherited an application that makes extensive use of ld scripts. The former developer hard-coded many absolute directory paths into these scripts, e.g.: -L /home/harold/libs -( -lnwiss -lr -) @/home/harold/libs lib.ld I would like to use environment variables so that I can use, say /home/jay/ rather than /home/harold. So I'll define: export APP_LIBS=/home/jay/libs but neither of the following works: -L $APP_LIBS -( -lnwiss -lr -) @$APP_LIBS lib.ld Is there a special notation for employing environment variables in ld scripts? Thanks, Jay