All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix compilation errors when using special directory
@ 2021-12-31  7:55 cgel.zte
  2021-12-31 10:44 ` kernel test robot
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: cgel.zte @ 2021-12-31  7:55 UTC (permalink / raw)
  To: masahiroy, michal.lkml, ndesaulniers; +Cc: linux-kbuild, linux-kernel, xu xin

From: xu xin <xu.xin16@zte.com.cn>

When we compile the kernel with cross compilers, if CROSS_COMPILE is
specified by the path containing special directory like '~', some
compilation error will occurs.

Here's an example:

$ make ARCH=x86_64
CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu- all

error:./scripts/mkcompile_h: line 64:
~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-ld: No such file or
directory

Since there are many other similar scripts using these variables, in
order to solve the problem from the source, add realpath in makefile to
turn these variables into absolute paths.

Signed-off-by: xu xin <xu.xin16@zte.com.cn>
---
 Makefile | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile
index fe5a4d8e4ac5..cdbb747787ac 100644
--- a/Makefile
+++ b/Makefile
@@ -459,14 +459,14 @@ OBJDUMP		= llvm-objdump
 READELF		= llvm-readelf
 STRIP		= llvm-strip
 else
-CC		= $(CROSS_COMPILE)gcc
-LD		= $(CROSS_COMPILE)ld
-AR		= $(CROSS_COMPILE)ar
-NM		= $(CROSS_COMPILE)nm
-OBJCOPY		= $(CROSS_COMPILE)objcopy
-OBJDUMP		= $(CROSS_COMPILE)objdump
-READELF		= $(CROSS_COMPILE)readelf
-STRIP		= $(CROSS_COMPILE)strip
+CC		= $(realpath $(CROSS_COMPILE))gcc
+LD		= $(realpath $(CROSS_COMPILE))ld
+AR		= $(realpath $(CROSS_COMPILE))ar
+NM		= $(realpath $(CROSS_COMPILE))nm
+OBJCOPY		= $(realpath $(CROSS_COMPILE))objcopy
+OBJDUMP		= $(realpath $(CROSS_COMPILE))objdump
+READELF		= $(realpath $(CROSS_COMPILE))readelf
+STRIP		= $(realpath $(CROSS_COMPILE))strip
 endif
 RUSTC		= rustc
 RUSTDOC		= rustdoc
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix compilation errors when using special directory
  2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
@ 2021-12-31 10:44 ` kernel test robot
  2021-12-31 10:44 ` kernel test robot
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-12-31 10:44 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2292 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20211224]
[also build test ERROR on v5.16-rc7]
[cannot apply to linus/master v5.16-rc7 v5.16-rc6 v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/Fix-compilation-errors-when-using-special-directory/20211231-155729
base:    ea586a076e8aa606c59b66d86660590f18354b11
config: m68k-stmark2_defconfig (https://download.01.org/0day-ci/archive/20211231/202112311819.WcS6VMvS-lkp(a)intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/3a3fad053bcae44914eb5d828fc793957fff28a0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review cgel-zte-gmail-com/Fix-compilation-errors-when-using-special-directory/20211231-155729
        git checkout 3a3fad053bcae44914eb5d828fc793957fff28a0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> gcc: error: unrecognized command-line option '-mcfv4e'
   make[2]: *** [scripts/Makefile.build:289: scripts/mod/empty.o] Error 1
>> gcc: error: unrecognized command-line option '-mcfv4e'
   make[2]: *** [scripts/Makefile.build:122: scripts/mod/devicetable-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1263: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:226: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix compilation errors when using special directory
  2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
  2021-12-31 10:44 ` kernel test robot
@ 2021-12-31 10:44 ` kernel test robot
  2021-12-31 17:05 ` Nathan Chancellor
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2021-12-31 10:44 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 8945 bytes --]

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20211224]
[also build test ERROR on v5.16-rc7]
[cannot apply to linus/master v5.16-rc7 v5.16-rc6 v5.16-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/cgel-zte-gmail-com/Fix-compilation-errors-when-using-special-directory/20211231-155729
base:    ea586a076e8aa606c59b66d86660590f18354b11
config: m68k-allyesconfig (https://download.01.org/0day-ci/archive/20211231/202112311829.3CAhxXxN-lkp(a)intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/0day-ci/linux/commit/3a3fad053bcae44914eb5d828fc793957fff28a0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review cgel-zte-gmail-com/Fix-compilation-errors-when-using-special-directory/20211231-155729
        git checkout 3a3fad053bcae44914eb5d828fc793957fff28a0
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k prepare

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr]
   scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
>> cc1: warning: unknown register name: a2
>> cc1: warning: unknown register name: a2
   In file included from include/linux/string.h:20,
                    from include/linux/uuid.h:12,
                    from include/linux/mod_devicetable.h:13,
                    from scripts/mod/devicetable-offsets.c:3:
>> arch/m68k/include/asm/string.h:64:25: warning: conflicting types for built-in function '__builtin_memcmp'; expected 'int(const void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch]
      64 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n)
         |                         ^~~~~~~~~~~~~~~~
   include/linux/string.h:156:12: note: in expansion of macro 'memcmp'
     156 | extern int memcmp(const void *,const void *,__kernel_size_t);
         |            ^~~~~~
   In file included from include/linux/uuid.h:12,
                    from include/linux/mod_devicetable.h:13,
                    from scripts/mod/devicetable-offsets.c:3:
   include/linux/string.h:21:1: note: '__builtin_memcmp' is declared in header '<string.h>'
      20 | #include <asm/string.h>
     +++ |+#include <string.h>
      21 | 
>> cc1: warning: unknown register name: a2
>> cc1: warning: unknown register name: a2
   In file included from include/linux/sched.h:12,
                    from arch/m68k/kernel/asm-offsets.c:15:
>> arch/m68k/include/asm/current.h:7:30: error: invalid register name for 'current'
       7 | register struct task_struct *current __asm__("%a2");
         |                              ^~~~~~~
   In file included from include/linux/string.h:20,
                    from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/m68k/kernel/asm-offsets.c:15:
>> arch/m68k/include/asm/string.h:64:25: warning: conflicting types for built-in function '__builtin_memcmp'; expected 'int(const void *, const void *, long unsigned int)' [-Wbuiltin-declaration-mismatch]
      64 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n)
         |                         ^~~~~~~~~~~~~~~~
   include/linux/string.h:156:12: note: in expansion of macro 'memcmp'
     156 | extern int memcmp(const void *,const void *,__kernel_size_t);
         |            ^~~~~~
   In file included from include/linux/bitmap.h:11,
                    from include/linux/cpumask.h:12,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/rcupdate.h:29,
                    from include/linux/rculist.h:11,
                    from include/linux/pid.h:5,
                    from include/linux/sched.h:14,
                    from arch/m68k/kernel/asm-offsets.c:15:
   include/linux/string.h:21:1: note: '__builtin_memcmp' is declared in header '<string.h>'
      20 | #include <asm/string.h>
     +++ |+#include <string.h>
      21 | 
   In file included from arch/m68k/include/asm/io_mm.h:25,
                    from arch/m68k/include/asm/io.h:8,
                    from include/linux/io.h:13,
                    from include/linux/irq.h:20,
                    from include/asm-generic/hardirq.h:17,
                    from ./arch/m68k/include/generated/asm/hardirq.h:1,
                    from include/linux/hardirq.h:11,
                    from include/linux/interrupt.h:11,
                    from include/linux/kernel_stat.h:9,
                    from arch/m68k/kernel/asm-offsets.c:16:
   arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
>> arch/m68k/include/asm/raw_io.h:83:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      83 |  ({u8 __maybe_unused __w, __v = (b);  u32 _addr = ((u32) (addr)); \
         |                                                    ^
   arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
     430 |   rom_out_8(port, *buf++);
         |   ^~~~~~~~~
   arch/m68k/include/asm/raw_io.h:84:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      84 |  __w = ((*(__force volatile u8 *)  ((_addr | 0x10000) + (__v<<1)))); })
         |           ^
   arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
     430 |   rom_out_8(port, *buf++);
         |   ^~~~~~~~~
   arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
   arch/m68k/include/asm/raw_io.h:86:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      86 |  ({u16 __maybe_unused __w, __v = (w); u32 _addr = ((u32) (addr)); \
         |                                                    ^
   arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
     448 |   rom_out_be16(port, *buf++);
         |   ^~~~~~~~~~~~
   arch/m68k/include/asm/raw_io.h:88:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      88 |  __w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v >> 8)<<1)))); })
         |           ^
   arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
     448 |   rom_out_be16(port, *buf++);
         |   ^~~~~~~~~~~~
   arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
   arch/m68k/include/asm/raw_io.h:90:52: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      90 |  ({u16 __maybe_unused __w, __v = (w); u32 _addr = ((u32) (addr)); \
         |                                                    ^
   arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
     466 |   rom_out_le16(port, *buf++);
         |   ^~~~~~~~~~~~
   arch/m68k/include/asm/raw_io.h:92:11: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      92 |  __w = ((*(__force volatile u16 *) ((_addr | 0x10000) + ((__v & 0xFF)<<1)))); })
         |           ^
   arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
     466 |   rom_out_le16(port, *buf++);
         |   ^~~~~~~~~~~~
   make[2]: *** [scripts/Makefile.build:122: arch/m68k/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1264: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:226: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.


vim +/current +7 arch/m68k/include/asm/current.h

2844b660358c92 Greg Ungerer 2009-02-06  6  
2844b660358c92 Greg Ungerer 2009-02-06 @7  register struct task_struct *current __asm__("%a2");
2844b660358c92 Greg Ungerer 2009-02-06  8  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix compilation errors when using special directory
  2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
  2021-12-31 10:44 ` kernel test robot
  2021-12-31 10:44 ` kernel test robot
@ 2021-12-31 17:05 ` Nathan Chancellor
  2022-01-03  7:29 ` Masahiro Yamada
  2022-01-04 18:07 ` Nick Desaulniers
  4 siblings, 0 replies; 6+ messages in thread
From: Nathan Chancellor @ 2021-12-31 17:05 UTC (permalink / raw)
  To: cgel.zte
  Cc: masahiroy, michal.lkml, ndesaulniers, linux-kbuild, linux-kernel, xu xin

On Fri, Dec 31, 2021 at 07:55:51AM +0000, cgel.zte@gmail.com wrote:
> From: xu xin <xu.xin16@zte.com.cn>
> 
> When we compile the kernel with cross compilers, if CROSS_COMPILE is
> specified by the path containing special directory like '~', some
> compilation error will occurs.
> 
> Here's an example:
> 
> $ make ARCH=x86_64
> CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu- all
> 
> error:./scripts/mkcompile_h: line 64:
> ~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-ld: No such file or
> directory
> 
> Since there are many other similar scripts using these variables, in
> order to solve the problem from the source, add realpath in makefile to
> turn these variables into absolute paths.

This is not going to work for the traditional approach of CROSS_COMPILE
being just a triple, rather than a full path plus a triple, because

$(realpath $(CROSS_COMPILE))

is going to evaluate to nothing in that case:

$ make -skj"$(nproc)" ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig all
warning: ld does not support --fix-cortex-a53-843419; kernel may be susceptible to erratum
ld: unrecognised emulation mode: aarch64linux
Supported emulations: elf_x86_64 elf32_x86_64 elf_i386 elf_iamcu elf_l1om elf_k1om i386pep i386pe
make[2]: *** [arch/arm64/kernel/vdso/Makefile:57: arch/arm64/kernel/vdso/vdso.so.dbg] Error 1
...

Why not just change '~' to '$HOME' in your build scripts so that it is
evaluated before the make command begins?

> Signed-off-by: xu xin <xu.xin16@zte.com.cn>
> ---
>  Makefile | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index fe5a4d8e4ac5..cdbb747787ac 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -459,14 +459,14 @@ OBJDUMP		= llvm-objdump
>  READELF		= llvm-readelf
>  STRIP		= llvm-strip
>  else
> -CC		= $(CROSS_COMPILE)gcc
> -LD		= $(CROSS_COMPILE)ld
> -AR		= $(CROSS_COMPILE)ar
> -NM		= $(CROSS_COMPILE)nm
> -OBJCOPY		= $(CROSS_COMPILE)objcopy
> -OBJDUMP		= $(CROSS_COMPILE)objdump
> -READELF		= $(CROSS_COMPILE)readelf
> -STRIP		= $(CROSS_COMPILE)strip
> +CC		= $(realpath $(CROSS_COMPILE))gcc
> +LD		= $(realpath $(CROSS_COMPILE))ld
> +AR		= $(realpath $(CROSS_COMPILE))ar
> +NM		= $(realpath $(CROSS_COMPILE))nm
> +OBJCOPY		= $(realpath $(CROSS_COMPILE))objcopy
> +OBJDUMP		= $(realpath $(CROSS_COMPILE))objdump
> +READELF		= $(realpath $(CROSS_COMPILE))readelf
> +STRIP		= $(realpath $(CROSS_COMPILE))strip
>  endif
>  RUSTC		= rustc
>  RUSTDOC		= rustdoc
> -- 
> 2.25.1
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix compilation errors when using special directory
  2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
                   ` (2 preceding siblings ...)
  2021-12-31 17:05 ` Nathan Chancellor
@ 2022-01-03  7:29 ` Masahiro Yamada
  2022-01-04 18:07 ` Nick Desaulniers
  4 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-01-03  7:29 UTC (permalink / raw)
  To: cgel.zte
  Cc: Michal Marek, Nick Desaulniers, Linux Kbuild mailing list,
	Linux Kernel Mailing List, xu xin

On Fri, Dec 31, 2021 at 4:56 PM <cgel.zte@gmail.com> wrote:
>
> From: xu xin <xu.xin16@zte.com.cn>
>
> When we compile the kernel with cross compilers, if CROSS_COMPILE is
> specified by the path containing special directory like '~', some
> compilation error will occurs.
>
> Here's an example:
>
> $ make ARCH=x86_64
> CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu- all
>
> error:./scripts/mkcompile_h: line 64:
> ~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-ld: No such file or
> directory
>
> Since there are many other similar scripts using these variables, in
> order to solve the problem from the source, add realpath in makefile to
> turn these variables into absolute paths.
>
> Signed-off-by: xu xin <xu.xin16@zte.com.cn>


This depends on what shell you are using.


If you use a modern shell like bash,
~ is expanded into the home directory path
on the shell side.

So, Make will see the absolute path.
In contrast, dash does not expand ~.


[Test code]
$(warning CROSS_COMPILE is $(CROSS_COMPILE))
all:
        @:



[Result]
masahiro@grover:/tmp$ bash
masahiro@grover:/tmp$ make
CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-
all
Makefile:1: CROSS_COMPILE is
/home/masahiro/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-
masahiro@grover:/tmp$ dash
$ make CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu- all
Makefile:1: CROSS_COMPILE is
~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu-





Moreover, your patch does not work at all because
the $(realpath ) built-in function does not expand ~.

~ is a shell's special character (and only some shells recognize it).
GNU Make is completely agnostic about such a character.



If you are using such a shell that does not understand ~,
as Nathan suggested, you can use $HOME.



> ---
>  Makefile | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index fe5a4d8e4ac5..cdbb747787ac 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -459,14 +459,14 @@ OBJDUMP           = llvm-objdump
>  READELF                = llvm-readelf
>  STRIP          = llvm-strip
>  else
> -CC             = $(CROSS_COMPILE)gcc
> -LD             = $(CROSS_COMPILE)ld
> -AR             = $(CROSS_COMPILE)ar
> -NM             = $(CROSS_COMPILE)nm
> -OBJCOPY                = $(CROSS_COMPILE)objcopy
> -OBJDUMP                = $(CROSS_COMPILE)objdump
> -READELF                = $(CROSS_COMPILE)readelf
> -STRIP          = $(CROSS_COMPILE)strip
> +CC             = $(realpath $(CROSS_COMPILE))gcc
> +LD             = $(realpath $(CROSS_COMPILE))ld
> +AR             = $(realpath $(CROSS_COMPILE))ar
> +NM             = $(realpath $(CROSS_COMPILE))nm
> +OBJCOPY                = $(realpath $(CROSS_COMPILE))objcopy
> +OBJDUMP                = $(realpath $(CROSS_COMPILE))objdump
> +READELF                = $(realpath $(CROSS_COMPILE))readelf
> +STRIP          = $(realpath $(CROSS_COMPILE))strip
>  endif
>  RUSTC          = rustc
>  RUSTDOC                = rustdoc
> --
> 2.25.1
>


--
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] Fix compilation errors when using special directory
  2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
                   ` (3 preceding siblings ...)
  2022-01-03  7:29 ` Masahiro Yamada
@ 2022-01-04 18:07 ` Nick Desaulniers
  4 siblings, 0 replies; 6+ messages in thread
From: Nick Desaulniers @ 2022-01-04 18:07 UTC (permalink / raw)
  To: cgel.zte; +Cc: masahiroy, michal.lkml, linux-kbuild, linux-kernel, xu xin

On Thu, Dec 30, 2021 at 11:55 PM <cgel.zte@gmail.com> wrote:
>
> From: xu xin <xu.xin16@zte.com.cn>
>
> When we compile the kernel with cross compilers, if CROSS_COMPILE is
> specified by the path containing special directory like '~', some
> compilation error will occurs.
>
> Here's an example:
>
> $ make ARCH=x86_64
> CROSS_COMPILE=~/x86_64_gcc9.2.0_glibc2.31.0/bin/x86_64-pc-linux-gnu- all

I guess you could replace ~ with `$(realpath ...)` in the above
command line invocation of make?
-- 
Thanks,
~Nick Desaulniers

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-01-04 18:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31  7:55 [PATCH] Fix compilation errors when using special directory cgel.zte
2021-12-31 10:44 ` kernel test robot
2021-12-31 10:44 ` kernel test robot
2021-12-31 17:05 ` Nathan Chancellor
2022-01-03  7:29 ` Masahiro Yamada
2022-01-04 18:07 ` Nick Desaulniers

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.