Re: [PATCH 2/2] toolchain/musl: remove several GNU headers

2020-08-29 Thread Rosen Penev
On Fri, Aug 28, 2020 at 10:40 PM Felix Fietkau  wrote:
>
> On 2020-08-29 05:28, Rosen Penev wrote:
> > Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools can be fixed
> > separately.
> >
> > Remove woresize.h file. It seems to be for an old version of GCC.
> >
> > Remove features.h and glibc-types files. Same as above.
> >
> > Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
> > that use it have already been patched.
> >
> > Tested with all packages in the base tree. They all compile.
> Did you verify all packages in the feeds as well? When I added some of
> these headers years ago, it was because some packages there were still
> relying on them.
Yes. SInce I have commit access to the packages feed, I fixed all of them.
>
> - Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [PATCH 2/2] toolchain/musl: remove several GNU headers

2020-08-28 Thread Felix Fietkau
On 2020-08-29 05:28, Rosen Penev wrote:
> Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools can be fixed
> separately.
> 
> Remove woresize.h file. It seems to be for an old version of GCC.
> 
> Remove features.h and glibc-types files. Same as above.
> 
> Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
> that use it have already been patched.
> 
> Tested with all packages in the base tree. They all compile.
Did you verify all packages in the feeds as well? When I added some of
these headers years ago, it was because some packages there were still
relying on them.

- Felix

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[PATCH 2/2] toolchain/musl: remove several GNU headers

2020-08-28 Thread Rosen Penev
Remove GLOB_ONLYDIR patch. Only fstools relies on it. fstools can be fixed
separately.

Remove woresize.h file. It seems to be for an old version of GCC.

Remove features.h and glibc-types files. Same as above.

Remove sys/cdefs.h. This is a deprecated header. Patches to fix packages
that use it have already been patched.

Tested with all packages in the base tree. They all compile.

Signed-off-by: Rosen Penev 
---
 v4: remove sys/cdefs.h as well.
 v3: rebase and split commit between version update and header
 removal.
 v2: removed more glibc headers.
 toolchain/musl/include/bits/wordsize.h|   1 -
 toolchain/musl/include/features.h |  56 ---
 toolchain/musl/include/sgidefs.h  |  73 
 toolchain/musl/include/sys/cdefs.h| 378 --
 toolchain/musl/include/sys/glibc-types.h  |  35 --
 .../musl/patches/100-add_glob_onlydir.patch   |  11 -
 6 files changed, 554 deletions(-)
 delete mode 100644 toolchain/musl/include/bits/wordsize.h
 delete mode 100644 toolchain/musl/include/features.h
 delete mode 100644 toolchain/musl/include/sgidefs.h
 delete mode 100644 toolchain/musl/include/sys/cdefs.h
 delete mode 100644 toolchain/musl/include/sys/glibc-types.h
 delete mode 100644 toolchain/musl/patches/100-add_glob_onlydir.patch

diff --git a/toolchain/musl/include/bits/wordsize.h 
b/toolchain/musl/include/bits/wordsize.h
deleted file mode 100644
index 2d4cbe8317..00
--- a/toolchain/musl/include/bits/wordsize.h
+++ /dev/null
@@ -1 +0,0 @@
-#include 
diff --git a/toolchain/musl/include/features.h 
b/toolchain/musl/include/features.h
deleted file mode 100644
index e801e2299a..00
--- a/toolchain/musl/include/features.h
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef _FEATURES_H
-#define _FEATURES_H
-
-#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE)
-#define _GNU_SOURCE 1
-#endif
-
-#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE)
-#define _BSD_SOURCE 1
-#endif
-
-#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \
- && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \
- && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__)
-#define _BSD_SOURCE 1
-#define _XOPEN_SOURCE 700
-#endif
-
-#if __STDC_VERSION__ >= 199901L
-#define __restrict restrict
-#elif !defined(__GNUC__)
-#define __restrict
-#endif
-
-#if __STDC_VERSION__ >= 199901L || defined(__cplusplus)
-#define __inline inline
-#elif !defined(__GNUC__)
-#define __inline
-#endif
-
-#if __STDC_VERSION__ >= 201112L
-#elif defined(__GNUC__)
-#define _Noreturn __attribute__((__noreturn__))
-#else
-#define _Noreturn
-#endif
-
-#define __REDIR(x,y) __typeof__(x) x __asm__(#y)
-
-/* Convenience macros to test the versions of glibc and gcc.
-   Use them like this:
-   #if __GNUC_PREREQ (2,8)
-   ... code requiring gcc 2.8 or later ...
-   #endif
-   Note - they won't work for gcc1 or glibc1, since the _MINOR macros
-   were not defined then.  */
-#if defined __GNUC__ && defined __GNUC_MINOR__
-# define __GNUC_PREREQ(maj, min) \
-   ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
-#else
-# define __GNUC_PREREQ(maj, min) 0
-#endif
-
-#include 
-
-#endif
diff --git a/toolchain/musl/include/sgidefs.h b/toolchain/musl/include/sgidefs.h
deleted file mode 100644
index 74509fdbd0..00
--- a/toolchain/musl/include/sgidefs.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* Copyright (C) 1996, 1997, 1998, 2003, 2004 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-   Contributed by Ralf Baechle .
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef _SGIDEFS_H
-#define _SGIDEFS_H 1
-
-/*
- * A crude hack to stop 
- */
-#undef __ASM_SGIDEFS_H
-#define __ASM_SGIDEFS_H
-
-/*
- * And remove any damage it might have already done
- */
-#undef _MIPS_ISA_MIPS1
-#undef _MIPS_ISA_MIPS2
-#undef _MIPS_ISA_MIPS3
-#undef _MIPS_ISA_MIPS4
-#undef _MIPS_ISA_MIPS5
-#undef _MIPS_ISA_MIPS32
-#undef _MIPS_ISA_MIPS64
-
-#undef _MIPS_SIM_ABI32
-#undef _MIPS_SIM_NABI32
-#undef _MIPS_SIM_ABI64
-
-/*
- * Definitions for the ISA level
- */
-#define _MIPS_ISA_MIPS1 1
-#define _MIPS_ISA_MIPS2 2
-#define _MIPS_ISA_MIPS3 3
-#define _MIPS_ISA_MIPS4 4
-#define _MIPS_ISA_MIPS5 5
-#define _MIPS_ISA_MIPS32 6
-#define _MIPS_ISA_MIPS64 7
-
-/*
- * Subprogram calling convention
- */
-#ifndef