pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/cwrappers Set the correct operation mode in t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cc17a37ba6fb
branches:  trunk
changeset: 370911:cc17a37ba6fb
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Fri Oct 27 20:59:59 2017 +0000

description:
Set the correct operation mode in the wrapper for as(1)

This notably fixes building lang/g95 with PKGSRC_MKPIE=yes.

Reviewed by joerg@

diffstat:

 pkgtools/cwrappers/Makefile                 |   4 +-
 pkgtools/cwrappers/files/bin/Makefile       |   4 +-
 pkgtools/cwrappers/files/bin/base-wrapper.c |   6 +++-
 pkgtools/cwrappers/files/bin/common.h       |   4 ++-
 pkgtools/cwrappers/files/bin/normalise-as.c |  38 +++++++++++++++++++++++++++++
 5 files changed, 49 insertions(+), 7 deletions(-)

diffs (110 lines):

diff -r 21e502adc34f -r cc17a37ba6fb pkgtools/cwrappers/Makefile
--- a/pkgtools/cwrappers/Makefile       Fri Oct 27 20:57:16 2017 +0000
+++ b/pkgtools/cwrappers/Makefile       Fri Oct 27 20:59:59 2017 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.20 2017/06/11 19:34:43 joerg Exp $
+# $NetBSD: Makefile,v 1.21 2017/10/27 20:59:59 khorben Exp $
 
-PKGNAME=               cwrappers-20170611
+PKGNAME=               cwrappers-20171027
 CATEGORIES=            pkgtools sysutils
 
 MAINTAINER=            joerg%NetBSD.org@localhost
diff -r 21e502adc34f -r cc17a37ba6fb pkgtools/cwrappers/files/bin/Makefile
--- a/pkgtools/cwrappers/files/bin/Makefile     Fri Oct 27 20:57:16 2017 +0000
+++ b/pkgtools/cwrappers/files/bin/Makefile     Fri Oct 27 20:59:59 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2016/12/09 22:25:28 joerg Exp $
+# $NetBSD: Makefile,v 1.6 2017/10/27 20:59:59 khorben Exp $
 #
 PROGS= as-wrapper cc-wrapper c++-wrapper cpp-wrapper f77-wrapper \
        imake-wrapper ld-wrapper libtool-wrapper shlibtool-wrapper
@@ -16,7 +16,7 @@
 
 CC_SRCS=       ${LIB_SRCS} generic-transform-cc.c normalise-cc.c
 
-SRCS.as-wrapper=       ${CC_SRCS} as-wrapper.c
+SRCS.as-wrapper=       ${CC_SRCS} as-wrapper.c normalise-as.c
 SRCS.cc-wrapper=       ${CC_SRCS} cc-wrapper.c transform-cc.c
 SRCS.c++-wrapper=      ${CC_SRCS} c++-wrapper.c transform-cc.c
 SRCS.cpp-wrapper=      ${CC_SRCS} cpp-wrapper.c
diff -r 21e502adc34f -r cc17a37ba6fb pkgtools/cwrappers/files/bin/base-wrapper.c
--- a/pkgtools/cwrappers/files/bin/base-wrapper.c       Fri Oct 27 20:57:16 2017 +0000
+++ b/pkgtools/cwrappers/files/bin/base-wrapper.c       Fri Oct 27 20:59:59 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: base-wrapper.c,v 1.5 2017/06/11 19:34:43 joerg Exp $ */
+/* $NetBSD: base-wrapper.c,v 1.6 2017/10/27 20:59:59 khorben Exp $ */
 
 /*-
  * Copyright (c) 2007, 2017 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -128,7 +128,9 @@
                goto skip_transforms;
 #endif
 
-#if defined(WRAPPER_LD)
+#if defined(WRAPPER_AS)
+       operation_mode_as();
+#elif defined(WRAPPER_LD)
        operation_mode_ld(&args);
 #else
        operation_mode_cc(&args);
diff -r 21e502adc34f -r cc17a37ba6fb pkgtools/cwrappers/files/bin/common.h
--- a/pkgtools/cwrappers/files/bin/common.h     Fri Oct 27 20:57:16 2017 +0000
+++ b/pkgtools/cwrappers/files/bin/common.h     Fri Oct 27 20:59:59 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.6 2017/06/11 19:34:43 joerg Exp $ */
+/* $NetBSD: common.h,v 1.7 2017/10/27 20:59:59 khorben Exp $ */
 
 /*-
  * Copyright (c) 2009, 2017 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -94,6 +94,8 @@
 char   *xstrdup(const char *);
 char   *xstrndup(const char *, size_t);
 
+void   operation_mode_as(void);
+
 void   operation_mode_cc(struct arglist *);
 void   normalise_cc(struct arglist *);
 void   cleanup_cc(struct arglist *args);
diff -r 21e502adc34f -r cc17a37ba6fb pkgtools/cwrappers/files/bin/normalise-as.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/pkgtools/cwrappers/files/bin/normalise-as.c       Fri Oct 27 20:59:59 2017 +0000
@@ -0,0 +1,38 @@
+/* $NetBSD: normalise-as.c,v 1.1 2017/10/27 20:59:59 khorben Exp $ */
+
+/*-
+ * Copyright (c) 2017 Pierre Pronchery <khorben%defora.org@localhost>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
+ * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "common.h"
+
+void
+operation_mode_as(void)
+{
+       current_operation_mode = mode_assemble;
+}



Home | Main Index | Thread Index | Old Index