diff --git a/gcc/cobol/built-gcobol b/gcc/cobol/built-gcobol index 810e3a94bcc0c5323c95405b72fc677181ef7a53..6c0030005d78619870125a6af785808e97ff3a07 100755 --- a/gcc/cobol/built-gcobol +++ b/gcc/cobol/built-gcobol @@ -7,8 +7,6 @@ libdir=$(ls $objdir/$(arch)* -d) $objdir/gcc/gcobol \ -B$objdir/gcc \ - -L$libdir/libgcobol/.libs \ - -L$libdir/libstdc++-v3/src/.libs \ $@ \ -L$libdir/libgcobol/.libs \ -L$libdir/libstdc++-v3/src/.libs \ diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc index 47be19ca790dea98e3763302a92ec247ea899f9a..17648161ab116f37ee541ba7c1bbb8f5e944d9e7 100644 --- a/gcc/cobol/gcobolspec.cc +++ b/gcc/cobol/gcobolspec.cc @@ -599,6 +599,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options, if( need_libgcobol ) { + if( 0 != strcmp(EXEC_LIB, "/usr/lib") ) + { + append_option(OPT_L, EXEC_LIB, 1); + } add_arg_lib(COBOL_LIBRARY, static_libgcobol); } if( need_libmath ) diff --git a/gcc/cobol/nist/Makefile b/gcc/cobol/nist/Makefile index 555091f4d57eaca495431dc1d48f0602123e58db..4608b0b5fabbe99438cf01b0ff1e752032113590 100644 --- a/gcc/cobol/nist/Makefile +++ b/gcc/cobol/nist/Makefile @@ -2,7 +2,6 @@ SRCDIR=$(shell git rev-parse --show-toplevel) BUILDDIR = $(SRCDIR)/build GCOBOL = $(BUILDDIR)/gcc/gcobol -B$(BUILDDIR)/gcc -COBOL1 = $(BUILDDIR)/gcc/cobol1 LIBGCOBOL_NAME = libgcobol.a LIBGCOBOL_PATH=$(dir $(shell find $(BUILDDIR) -name $(LIBGCOBOL_NAME)))